Browse Source

drm/amd/powerplay: fix suspend error on DPM disabled

Don't fail if DPM is disabled.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Huang Rui 8 years ago
parent
commit
4573f0f21d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      drivers/gpu/drm/amd/powerplay/amd_powerplay.c

+ 3 - 1
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;