drm/amd/powerplay: avoid double check feature enabled
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Patch1 & 2 are reviewed-by: Evan Quan <[email protected]>
For patch3, for dpm disabled case, "smu_get_dpm_freq_range(smu, clk_type, &min_freq,&max_freq)" will not se the min_freq and max_freq. That will cause some troubles for the succeeding smu_set_soft_freq_range. Please get that handled properly.
Regards,
Evan
Quoted 62 lines
-----Original Message-----
From: Wang, Kevin(Yang) <[email protected]>
Sent: Friday, July 12, 2019 3:00 PM
To: [email protected]
Cc: Feng, Kenneth <[email protected]>; Quan, Evan <[email protected]>; Wang, Kevin(Yang) <[email protected]>
Subject: [PATCH 3/3] drm/amd/powerplay: avoid double check feature enabledthe
unforce_dpm_levelsdoesn't need to check feature enable, because thesmu_get_dpm_freq_rangefunction has check feature logic.Change-Id I6ae62b355aa76a00f0f6e164cd9848fb32fc7c12Signed-off-by Kevin Wang <[email protected]>--- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 23 ++++++++-------------- 1 file changed, 8 insertions(+), 15 deletions(-)drivers/gpu/drm/amd/powerplay/navi10_ppt.c +7
-15@@ -833,27 +833,20 @@ static int navi10_force_dpm_limit_value(struct smu_context *smu, bool highest) return ret; } -static int navi10_unforce_dpm_levels (struct smu_context *smu) { - +static int navi10_unforce_dpm_levels (struct smu_context *smu) {int ret =0 , i =0 ;uint32_t min_freq, max_freq;enum smu_clk_type clk_type; -struct clk_feature_map { -enum smu_clk_type clk_type; -uint32_t feature; - } clk_feature_map[] = { - {SMU_GFXCLK ,SMU_FEATURE_DPM_GFXCLK_BIT }, - {SMU_MCLK ,SMU_FEATURE_DPM_UCLK_BIT }, - {SMU_SOCCLK ,SMU_FEATURE_DPM_SOCCLK_BIT }, +enum smu_clk_type clks[] = { +SMU_GFXCLK , +SMU_MCLK , +SMU_SOCCLK , }; -for (i =0 ; i <ARRAY_SIZE (clk_feature_map); i++) { -if (!smu_feature_is_enabled (smu, clk_feature_map[i].feature)) -continue ; - - clk_type = clk_feature_map[i].clk_type; - +for (i =0 ; i <ARRAY_SIZE (clks); i++) { + clk_type = clks[i]; ret = smu_get_dpm_freq_range(smu, clk_type, &min_freq,
&max_freq);drivers/gpu/drm/amd/powerplay/navi10_ppt.c +0
-1if (ret)return ret; --
Quoted 1 line
2.22.0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): MN2PR12MB33448DDED55CA6C501E4C5A8E4F20-rweVpJHSKToDMgCC8P//[email protected]
thanks,
i will make a new patch to fix this problem.
Best Regards,
Kevin
________________________________
From: Quan, Evan
Sent: Friday, July 12, 2019 3:09:54 PM
To: Wang, Kevin(Yang); [email protected]
Cc: Feng, Kenneth
Subject: RE: [PATCH 3/3] drm/amd/powerplay: avoid double check feature enabled
Patch1 & 2 are reviewed-by: Evan Quan <[email protected]>
For patch3, for dpm disabled case, "smu_get_dpm_freq_range(smu, clk_type, &min_freq,&max_freq)" will not se the min_freq and max_freq. That will cause some troubles for the succeeding smu_set_soft_freq_range. Please get that handled properly.
Regards,
Evan
Quoted 61 lines
-----Original Message-----
From: Wang, Kevin(Yang) <[email protected]>
Sent: Friday, July 12, 2019 3:00 PM
To: [email protected]
Cc: Feng, Kenneth <[email protected]>; Quan, Evan <[email protected]>; Wang, Kevin(Yang) <[email protected]>
Subject: [PATCH 3/3] drm/amd/powerplay: avoid double check feature
enabledthe
unforce_dpm_levelsdoesn't need to check feature enable, because thesmu_get_dpm_freq_rangefunction has check feature logic.Change-Id I6ae62b355aa76a00f0f6e164cd9848fb32fc7c12Signed-off-by Kevin Wang <[email protected]>--- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 23 ++++++++-------------- 1 file changed, 8 insertions(+), 15 deletions(-)drivers/gpu/drm/amd/powerplay/navi10_ppt.c +7
-15@@ -833,27 +833,20 @@ static int navi10_force_dpm_limit_value(struct smu_context *smu, bool highest) return ret; } -static int navi10_unforce_dpm_levels (struct smu_context *smu) { - +static int navi10_unforce_dpm_levels (struct smu_context *smu) {int ret =0 , i =0 ;uint32_t min_freq, max_freq;enum smu_clk_type clk_type; -struct clk_feature_map { -enum smu_clk_type clk_type; -uint32_t feature; - } clk_feature_map[] = { - {SMU_GFXCLK ,SMU_FEATURE_DPM_GFXCLK_BIT }, - {SMU_MCLK ,SMU_FEATURE_DPM_UCLK_BIT }, - {SMU_SOCCLK ,SMU_FEATURE_DPM_SOCCLK_BIT }, +enum smu_clk_type clks[] = { +SMU_GFXCLK , +SMU_MCLK , +SMU_SOCCLK , }; -for (i =0 ; i <ARRAY_SIZE (clk_feature_map); i++) { -if (!smu_feature_is_enabled (smu, clk_feature_map[i].feature)) -continue ; - - clk_type = clk_feature_map[i].clk_type; - +for (i =0 ; i <ARRAY_SIZE (clks); i++) { + clk_type = clks[i]; ret = smu_get_dpm_freq_range(smu, clk_type, &min_freq,&max_freq); if (ret) return ret;
Quoted 2 lines
--
2.22.0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx