drm/radeon: skip suspend/resume on DRM_SWITCH_POWER_DYNAMIC_OFF
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 31 Aug 2016 21:31:30 +0000 (17:31 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 2 Sep 2016 14:34:47 +0000 (10:34 -0400)
Missed this case previously. No need to do anything if the
device is already off.  runtime pm will handle it.

Acked-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_device.c

index a00dd2f745271ec760bff14d5455571388313ebd..cfb3e4fee24b2077d493ed011e24f2166da5ff84 100644 (file)
@@ -1594,7 +1594,8 @@ int radeon_suspend_kms(struct drm_device *dev, bool suspend,
 
        rdev = dev->dev_private;
 
-       if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
+       if (dev->switch_power_state == DRM_SWITCH_POWER_OFF ||
+           dev->switch_power_state == DRM_SWITCH_POWER_DYNAMIC_OFF)
                return 0;
 
        drm_kms_helper_poll_disable(dev);
@@ -1689,7 +1690,8 @@ int radeon_resume_kms(struct drm_device *dev, bool resume, bool fbcon)
        struct drm_crtc *crtc;
        int r;
 
-       if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
+       if (dev->switch_power_state == DRM_SWITCH_POWER_OFF ||
+           dev->switch_power_state == DRM_SWITCH_POWER_DYNAMIC_OFF)
                return 0;
 
        if (fbcon) {