diff options
author | Yifan Zhang <yifan1.zhang@amd.com> | 2022-03-15 18:19:06 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-03-25 12:40:24 -0400 |
commit | 60d61f4ed6ead43ad2de31ebb8d1d27c57290529 (patch) | |
tree | 4264f602243b2ef7bfeeb300f09ce13cb4dcf4d5 /drivers/gpu/drm/amd/pm | |
parent | 2d505453f38e18d42ba7d5428aaa17aaa7752c65 (diff) | |
download | linux-60d61f4ed6ead43ad2de31ebb8d1d27c57290529.tar.bz2 |
drm/amdgpu/pm: fix the Stable pstate Test in amdgpu_test
If GFX DPM is disbaled, Stable pstate Test in amdgpu_test fails.
Check GFX DPM statue before change clock level
Log:
[ 46.595274] [drm] Initialized amdgpu 3.46.0 20150101 for 0000:02:00.0 on minor 0
[ 46.599929] fbcon: amdgpudrmfb (fb0) is primary device
[ 46.785753] Console: switching to colour frame buffer device 240x67
[ 46.811765] amdgpu 0000:02:00.0: [drm] fb0: amdgpudrmfb frame buffer device
[ 131.398407] amdgpu 0000:02:00.0: amdgpu: Failed to set performance level!
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Acked-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/pm')
-rw-r--r-- | drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c index 7bfac029e513..b81711c4ff33 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_5_ppt.c @@ -991,7 +991,7 @@ static int smu_v13_0_5_set_performance_level(struct smu_context *smu, return -EINVAL; } - if (sclk_min && sclk_max) { + if (sclk_min && sclk_max && smu_v13_0_5_clk_dpm_is_enabled(smu, SMU_SCLK)) { ret = smu_v13_0_5_set_soft_freq_limited_range(smu, SMU_SCLK, sclk_min, |