[PATCH 3/3] drm/exynos: do not disable crtc if already off

Prathyush K prathyush.k at samsung.com
Tue Dec 4 06:26:51 PST 2012


The crtc disable function should not disable the overlays if the
crtc is already in DPMS_OFF as this will lead to register access
when clock is off.
Also the crtc disable function should not call DPMS OFF of the
crtc. This is required to ensure we are able to wait for vblank
before freeing any framebuffers after disabling the crtc.

Signed-off-by: Prathyush K <prathyush.k at samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_crtc.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index 2efa4b0..faa6ee0 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -186,8 +186,12 @@ static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
 
 	DRM_DEBUG_KMS("%s\n", __FILE__);
 
+	if (exynos_crtc->dpms > DRM_MODE_DPMS_ON) {
+		DRM_DEBUG_KMS("crtc is already off.\n");
+		return;
+	}
+
 	exynos_plane_dpms(exynos_crtc->plane, DRM_MODE_DPMS_OFF);
-	exynos_drm_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
 }
 
 static struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = {
-- 
1.7.0.4



More information about the dri-devel mailing list