drm/exynos: correct connector->dpms field before resuming
authorAndrzej Hajda <a.hajda@samsung.com>
Fri, 10 Oct 2014 12:31:56 +0000 (14:31 +0200)
committerInki Dae <daeinki@gmail.com>
Sun, 2 Nov 2014 16:51:28 +0000 (01:51 +0900)
During system suspend after connector switch off its dpms field
is set to connector previous dpms state. To properly resume dpms field
should be set to its actual state (off) before resuming to previous dpms state.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_drv.c

index 2353499196b67bb7b57f6d78b1430188a8ced778..c57466edf45b86e39ba292c9d37117a685fdaabd 100644 (file)
@@ -194,8 +194,12 @@ static int exynos_drm_resume(struct drm_device *dev)
 
        drm_modeset_lock_all(dev);
        list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
-               if (connector->funcs->dpms)
-                       connector->funcs->dpms(connector, connector->dpms);
+               if (connector->funcs->dpms) {
+                       int dpms = connector->dpms;
+
+                       connector->dpms = DRM_MODE_DPMS_OFF;
+                       connector->funcs->dpms(connector, dpms);
+               }
        }
        drm_modeset_unlock_all(dev);