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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
---
 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

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux