summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorEvan Quan <evan.quan@amd.com>2018-10-31 14:15:04 +0800
committerAlex Deucher <alexander.deucher@amd.com>2018-11-01 09:52:12 -0500
commit5be3bb6e92549f246f472d74bfaa54f56acbf998 (patch)
tree834073716ac48641be10edeb74a9f012a21494c2 /drivers
parent734afd4b217f827e71b39abea10f5492c6f27606 (diff)
downloadlinux-5be3bb6e92549f246f472d74bfaa54f56acbf998.tar.bz2
drm/amd/powerplay: no MGPU fan boost enablement on DPM disabled
As MGPU fan boost feature will be definitely not needed when DPM is disabled. So, there is no need to error out. Signed-off-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/powerplay/amd_powerplay.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
index bf09735ea3ac..d6aa1d414320 100644
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
@@ -1318,12 +1318,12 @@ static int pp_enable_mgpu_fan_boost(void *handle)
{
struct pp_hwmgr *hwmgr = handle;
- if (!hwmgr || !hwmgr->pm_en)
+ if (!hwmgr)
return -EINVAL;
- if (hwmgr->hwmgr_func->enable_mgpu_fan_boost == NULL) {
+ if (!hwmgr->pm_en ||
+ hwmgr->hwmgr_func->enable_mgpu_fan_boost == NULL)
return 0;
- }
mutex_lock(&hwmgr->smu_lock);
hwmgr->hwmgr_func->enable_mgpu_fan_boost(hwmgr);