Skip to content

Commit 80381d4

Browse files
Prike Liangalexdeucher
authored andcommitted
drm/amd/powerplay: fix pre-check condition for setting clock range
This fix will handle some MP1 FW issue like as mclk dpm table in renoir has a reverse dpm clock layout and a zero frequency dpm level as following case. cat pp_dpm_mclk 0: 1200Mhz 1: 1200Mhz 2: 800Mhz 3: 0Mhz Signed-off-by: Prike Liang <[email protected]> Reviewed-by: Evan Quan <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent a0275df commit 80381d4

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

drivers/gpu/drm/amd/powerplay/amdgpu_smu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ int smu_set_soft_freq_range(struct smu_context *smu, enum smu_clk_type clk_type,
222222
{
223223
int ret = 0;
224224

225-
if (min <= 0 && max <= 0)
225+
if (min < 0 && max < 0)
226226
return -EINVAL;
227227

228228
if (!smu_clk_dpm_is_enabled(smu, clk_type))

drivers/gpu/drm/amd/powerplay/smu_v12_0.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,9 +458,6 @@ int smu_v12_0_set_soft_freq_limited_range(struct smu_context *smu, enum smu_clk_
458458
{
459459
int ret = 0;
460460

461-
if (max < min)
462-
return -EINVAL;
463-
464461
switch (clk_type) {
465462
case SMU_GFXCLK:
466463
case SMU_SCLK:

0 commit comments

Comments
 (0)