summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_drv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index b1f7299600f0..7f3cfc5dd320 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -174,6 +174,7 @@ static int exynos_drm_suspend(struct device *dev)
if (pm_runtime_suspended(dev) || !drm_dev)
return 0;
+ drm_modeset_lock_all(drm_dev);
drm_connector_list_iter_begin(drm_dev, &conn_iter);
drm_for_each_connector_iter(connector, &conn_iter) {
int old_dpms = connector->dpms;
@@ -185,6 +186,7 @@ static int exynos_drm_suspend(struct device *dev)
connector->dpms = old_dpms;
}
drm_connector_list_iter_end(&conn_iter);
+ drm_modeset_unlock_all(drm_dev);
return 0;
}
@@ -198,6 +200,7 @@ static int exynos_drm_resume(struct device *dev)
if (pm_runtime_suspended(dev) || !drm_dev)
return 0;
+ drm_modeset_lock_all(drm_dev);
drm_connector_list_iter_begin(drm_dev, &conn_iter);
drm_for_each_connector_iter(connector, &conn_iter) {
if (connector->funcs->dpms) {
@@ -208,6 +211,7 @@ static int exynos_drm_resume(struct device *dev)
}
}
drm_connector_list_iter_end(&conn_iter);
+ drm_modeset_unlock_all(drm_dev);
return 0;
}