Skip to contentSkip to conversation

drm/exynos: check crtc's dpms mode at page flip

PATCH New Inki Dae 1 participant 1 message Sep 14, 2012

Subsystems (3)
lore
Share & tools
lore

Inki Dae

author maintainer
#0 lore raw

PATCH 3/4 drm/exynos: check crtc's dpms mode at page flip

when page flip is requested, crtc's dpms mode should be on. if not on, return -EPERM so that the hardware can't be accessed. if user requesed dpms off and next page flip then the hardware can be accessed with dpms off to enable vblank so this patch will prevent from accessing the hardware with dpms off.

---
 drivers/gpu/drm/exynos/exynos_drm_crtc.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_crtc.c +6 -0
index 8bd4d7e..5eda559 100644
@@ -207,6 +207,12 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc,
 
 	DRM_DEBUG_KMS("%s\n", __FILE__);
 
+	/* when the page flip is requested, crtc's dpms should be on */
+	if (exynos_crtc->dpms > DRM_MODE_DPMS_ON) {
+		DRM_ERROR("failed page flip request.\n");
+		return -EPERM;
+	}
+
 	mutex_lock(&dev->struct_mutex);
 
 	if (event) {
Signature · 1 line
1.7.4.1