From: Huang Rui Date: Mon, 10 Apr 2017 06:40:51 +0000 (+0800) Subject: drm/amd/powerplay: fix suspend error on DPM disabled X-Git-Tag: v4.12-rc1~9^2~2^2~121 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4573f0f21d6c40a9426d0418646d87bbf77d6ab5;p=karo-tx-linux.git drm/amd/powerplay: fix suspend error on DPM disabled Don't fail if DPM is disabled. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c index 9da5b0bb66d8..f73e80c4bf33 100644 --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c @@ -251,7 +251,9 @@ static int pp_suspend(void *handle) ret = pp_check(pp_handle); - if (ret != 0) + if (ret == PP_DPM_DISABLED) + return 0; + else if (ret != 0) return ret; eventmgr = pp_handle->eventmgr;