drm/amd/powerplay: fix suspend error on DPM disabled
authorHuang Rui <ray.huang@amd.com>
Mon, 10 Apr 2017 06:40:51 +0000 (14:40 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 28 Apr 2017 21:32:12 +0000 (17:32 -0400)
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>
drivers/gpu/drm/amd/powerplay/amd_powerplay.c

index 9da5b0b..f73e80c 100644 (file)
@@ -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;