<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">i think should be drop this patch from git tree,</p>
<p style="margin-top:0;margin-bottom:0">this patch only for b<span style="font-size: 12pt;">ringing up stage.</span></p>
<p style="margin-top:0;margin-bottom:0">thanks.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Best Regards,<br>
Kevin<br>
<span style="font-size: 12pt;"></span></p>
<div><br>
</div>
<p></p>
<p style="margin-top:0;margin-bottom:0"><span style="color: rgb(51, 51, 51); font-size: 21px;"></span></p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Christian König <ckoenig.leichtzumerken@gmail.com><br>
<b>Sent:</b> Tuesday, June 18, 2019 3:58:28 PM<br>
<b>To:</b> Alex Deucher; amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Deucher, Alexander; Wang, Kevin(Yang); Huang, Ray<br>
<b>Subject:</b> Re: [PATCH 247/459] Revert "drm/amdgpu: mask some pm interfaces for navi10 because they are changed or not workable so far"</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Am 17.06.19 um 21:30 schrieb Alex Deucher:<br>
> From: Kevin Wang <kevin1.wang@amd.com><br>
><br>
> This reverts commit fd9c75d217d5b4ed72672722b6621e2635363dfe.<br>
><br>
> Signed-off-by: Kevin Wang <kevin1.wang@amd.com><br>
> Reviewed-by: Huang Rui <ray.huang@amd.com><br>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com><br>
<br>
Would it be possible to squash that into the original commit which <br>
disabled things?<br>
<br>
Christian.<br>
<br>
> ---<br>
> drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +-<br>
> drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 156 +++++++++++-------------<br>
> 2 files changed, 73 insertions(+), 85 deletions(-)<br>
><br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c<br>
> index af86d9f47785..ed051fdb509f 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c<br>
> @@ -690,7 +690,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file<br>
> dev_info.num_shader_arrays_per_engine = adev->gfx.config.max_sh_per_se;<br>
> /* return all clocks in KHz */<br>
> dev_info.gpu_counter_freq = amdgpu_asic_get_xclk(adev) * 10;<br>
> - if (adev->pm.dpm_enabled && adev->asic_type != CHIP_NAVI10) {<br>
> + if (adev->pm.dpm_enabled) {<br>
> dev_info.max_engine_clock = amdgpu_dpm_get_sclk(adev, false) * 10;<br>
> dev_info.max_memory_clock = amdgpu_dpm_get_mclk(adev, false) * 10;<br>
> } else if (amdgpu_sriov_vf(adev) && amdgim_is_hwperf(adev) &&<br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c<br>
> index 8c28f816b50f..6b97f3098118 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c<br>
> @@ -2793,33 +2793,32 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)<br>
> return ret;<br>
> }<br>
> <br>
> - if (adev->asic_type != CHIP_NAVI10) {<br>
> - ret = device_create_file(adev->dev, &dev_attr_power_dpm_state);<br>
> - if (ret) {<br>
> - DRM_ERROR("failed to create device file for dpm state\n");<br>
> - return ret;<br>
> - }<br>
> - ret = device_create_file(adev->dev, &dev_attr_power_dpm_force_performance_level);<br>
> - if (ret) {<br>
> - DRM_ERROR("failed to create device file for dpm state\n");<br>
> - return ret;<br>
> - }<br>
> + ret = device_create_file(adev->dev, &dev_attr_power_dpm_state);<br>
> + if (ret) {<br>
> + DRM_ERROR("failed to create device file for dpm state\n");<br>
> + return ret;<br>
> + }<br>
> + ret = device_create_file(adev->dev, &dev_attr_power_dpm_force_performance_level);<br>
> + if (ret) {<br>
> + DRM_ERROR("failed to create device file for dpm state\n");<br>
> + return ret;<br>
> + }<br>
> <br>
> - ret = device_create_file(adev->dev, &dev_attr_pp_num_states);<br>
> - if (ret) {<br>
> - DRM_ERROR("failed to create device file pp_num_states\n");<br>
> - return ret;<br>
> - }<br>
> - ret = device_create_file(adev->dev, &dev_attr_pp_cur_state);<br>
> - if (ret) {<br>
> - DRM_ERROR("failed to create device file pp_cur_state\n");<br>
> - return ret;<br>
> - }<br>
> - ret = device_create_file(adev->dev, &dev_attr_pp_force_state);<br>
> - if (ret) {<br>
> - DRM_ERROR("failed to create device file pp_force_state\n");<br>
> - return ret;<br>
> - }<br>
> +<br>
> + ret = device_create_file(adev->dev, &dev_attr_pp_num_states);<br>
> + if (ret) {<br>
> + DRM_ERROR("failed to create device file pp_num_states\n");<br>
> + return ret;<br>
> + }<br>
> + ret = device_create_file(adev->dev, &dev_attr_pp_cur_state);<br>
> + if (ret) {<br>
> + DRM_ERROR("failed to create device file pp_cur_state\n");<br>
> + return ret;<br>
> + }<br>
> + ret = device_create_file(adev->dev, &dev_attr_pp_force_state);<br>
> + if (ret) {<br>
> + DRM_ERROR("failed to create device file pp_force_state\n");<br>
> + return ret;<br>
> }<br>
> ret = device_create_file(adev->dev, &dev_attr_pp_table);<br>
> if (ret) {<br>
> @@ -2832,55 +2831,52 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)<br>
> DRM_ERROR("failed to create device file pp_dpm_sclk\n");<br>
> return ret;<br>
> }<br>
> -<br>
> - if (adev->asic_type != CHIP_NAVI10) {<br>
> - ret = device_create_file(adev->dev, &dev_attr_pp_dpm_mclk);<br>
> - if (ret) {<br>
> - DRM_ERROR("failed to create device file pp_dpm_mclk\n");<br>
> - return ret;<br>
> - }<br>
> - if (adev->asic_type >= CHIP_VEGA10) {<br>
> - ret = device_create_file(adev->dev, &dev_attr_pp_dpm_socclk);<br>
> - if (ret) {<br>
> - DRM_ERROR("failed to create device file pp_dpm_socclk\n");<br>
> - return ret;<br>
> - }<br>
> - ret = device_create_file(adev->dev, &dev_attr_pp_dpm_dcefclk);<br>
> - if (ret) {<br>
> - DRM_ERROR("failed to create device file pp_dpm_dcefclk\n");<br>
> - return ret;<br>
> - }<br>
> - }<br>
> - if (adev->asic_type >= CHIP_VEGA20) {<br>
> - ret = device_create_file(adev->dev, &dev_attr_pp_dpm_fclk);<br>
> - if (ret) {<br>
> - DRM_ERROR("failed to create device file pp_dpm_fclk\n");<br>
> - return ret;<br>
> - }<br>
> - }<br>
> - ret = device_create_file(adev->dev, &dev_attr_pp_dpm_pcie);<br>
> - if (ret) {<br>
> - DRM_ERROR("failed to create device file pp_dpm_pcie\n");<br>
> - return ret;<br>
> - }<br>
> - ret = device_create_file(adev->dev, &dev_attr_pp_sclk_od);<br>
> + ret = device_create_file(adev->dev, &dev_attr_pp_dpm_mclk);<br>
> + if (ret) {<br>
> + DRM_ERROR("failed to create device file pp_dpm_mclk\n");<br>
> + return ret;<br>
> + }<br>
> + if (adev->asic_type >= CHIP_VEGA10) {<br>
> + ret = device_create_file(adev->dev, &dev_attr_pp_dpm_socclk);<br>
> if (ret) {<br>
> - DRM_ERROR("failed to create device file pp_sclk_od\n");<br>
> + DRM_ERROR("failed to create device file pp_dpm_socclk\n");<br>
> return ret;<br>
> }<br>
> - ret = device_create_file(adev->dev, &dev_attr_pp_mclk_od);<br>
> + ret = device_create_file(adev->dev, &dev_attr_pp_dpm_dcefclk);<br>
> if (ret) {<br>
> - DRM_ERROR("failed to create device file pp_mclk_od\n");<br>
> + DRM_ERROR("failed to create device file pp_dpm_dcefclk\n");<br>
> return ret;<br>
> }<br>
> - ret = device_create_file(adev->dev,<br>
> - &dev_attr_pp_power_profile_mode);<br>
> + }<br>
> + if (adev->asic_type >= CHIP_VEGA20) {<br>
> + ret = device_create_file(adev->dev, &dev_attr_pp_dpm_fclk);<br>
> if (ret) {<br>
> - DRM_ERROR("failed to create device file "<br>
> - "pp_power_profile_mode\n");<br>
> + DRM_ERROR("failed to create device file pp_dpm_fclk\n");<br>
> return ret;<br>
> }<br>
> }<br>
> + ret = device_create_file(adev->dev, &dev_attr_pp_dpm_pcie);<br>
> + if (ret) {<br>
> + DRM_ERROR("failed to create device file pp_dpm_pcie\n");<br>
> + return ret;<br>
> + }<br>
> + ret = device_create_file(adev->dev, &dev_attr_pp_sclk_od);<br>
> + if (ret) {<br>
> + DRM_ERROR("failed to create device file pp_sclk_od\n");<br>
> + return ret;<br>
> + }<br>
> + ret = device_create_file(adev->dev, &dev_attr_pp_mclk_od);<br>
> + if (ret) {<br>
> + DRM_ERROR("failed to create device file pp_mclk_od\n");<br>
> + return ret;<br>
> + }<br>
> + ret = device_create_file(adev->dev,<br>
> + &dev_attr_pp_power_profile_mode);<br>
> + if (ret) {<br>
> + DRM_ERROR("failed to create device file "<br>
> + "pp_power_profile_mode\n");<br>
> + return ret;<br>
> + }<br>
> if ((is_support_sw_smu(adev) && adev->smu.od_enabled) ||<br>
> (!is_support_sw_smu(adev) && hwmgr->od_enabled)) {<br>
> ret = device_create_file(adev->dev,<br>
> @@ -3056,25 +3052,21 @@ static int amdgpu_debugfs_pm_info_pp(struct seq_file *m, struct amdgpu_device *a<br>
> /* GPU Clocks */<br>
> size = sizeof(value);<br>
> seq_printf(m, "GFX Clocks and Power:\n");<br>
> - if (adev->asic_type != CHIP_NAVI10) {<br>
> - if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_GFX_MCLK, (void *)&value, &size))<br>
> - seq_printf(m, "\t%u MHz (MCLK)\n", value/100);<br>
> - if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_GFX_SCLK, (void *)&value, &size))<br>
> - seq_printf(m, "\t%u MHz (SCLK)\n", value/100);<br>
> - if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_STABLE_PSTATE_SCLK, (void *)&value, &size))<br>
> - seq_printf(m, "\t%u MHz (PSTATE_SCLK)\n", value/100);<br>
> - if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_STABLE_PSTATE_MCLK, (void *)&value, &size))<br>
> - seq_printf(m, "\t%u MHz (PSTATE_MCLK)\n", value/100);<br>
> - }<br>
> + if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_GFX_MCLK, (void *)&value, &size))<br>
> + seq_printf(m, "\t%u MHz (MCLK)\n", value/100);<br>
> + if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_GFX_SCLK, (void *)&value, &size))<br>
> + seq_printf(m, "\t%u MHz (SCLK)\n", value/100);<br>
> + if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_STABLE_PSTATE_SCLK, (void *)&value, &size))<br>
> + seq_printf(m, "\t%u MHz (PSTATE_SCLK)\n", value/100);<br>
> + if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_STABLE_PSTATE_MCLK, (void *)&value, &size))<br>
> + seq_printf(m, "\t%u MHz (PSTATE_MCLK)\n", value/100);<br>
> if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_VDDGFX, (void *)&value, &size))<br>
> seq_printf(m, "\t%u mV (VDDGFX)\n", value);<br>
> if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_VDDNB, (void *)&value, &size))<br>
> seq_printf(m, "\t%u mV (VDDNB)\n", value);<br>
> - if (adev->asic_type != CHIP_NAVI10) {<br>
> - size = sizeof(uint32_t);<br>
> - if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_GPU_POWER, (void *)&query, &size))<br>
> - seq_printf(m, "\t%u.%u W (average GPU)\n", query >> 8, query & 0xff);<br>
> - }<br>
> + size = sizeof(uint32_t);<br>
> + if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_GPU_POWER, (void *)&query, &size))<br>
> + seq_printf(m, "\t%u.%u W (average GPU)\n", query >> 8, query & 0xff);<br>
> size = sizeof(value);<br>
> seq_printf(m, "\n");<br>
> <br>
> @@ -3082,10 +3074,6 @@ static int amdgpu_debugfs_pm_info_pp(struct seq_file *m, struct amdgpu_device *a<br>
> if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_GPU_TEMP, (void *)&value, &size))<br>
> seq_printf(m, "GPU Temperature: %u C\n", value/1000);<br>
> <br>
> - /* TODO: will be removed after gpu load, feature mask, uvd/vce clocks enabled on navi10 */<br>
> - if (adev->asic_type == CHIP_NAVI10)<br>
> - return 0;<br>
> -<br>
> /* GPU Load */<br>
> if (!amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_GPU_LOAD, (void *)&value, &size))<br>
> seq_printf(m, "GPU Load: %u %%\n", value);<br>
<br>
</div>
</span></font></div>
</body>
</html>