]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm/exynos: check crtc's dpms mode at page flip
authorInki Dae <inki.dae@samsung.com>
Tue, 11 Sep 2012 09:25:21 +0000 (18:25 +0900)
committerInki Dae <inki.dae@samsung.com>
Thu, 4 Oct 2012 01:06:01 +0000 (10:06 +0900)
when page flip is requested, crtc's dpms mode should be on.
if not on, return -EINVAL so that it doesn't access hardware.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_crtc.c

index 8bd4d7ed964bcf51031bccb86352c3d7ece55a44..07c5d2a0bdc0e1e14bbbc67decc63f3764386519 100644 (file)
@@ -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 -EINVAL;
+       }
+
        mutex_lock(&dev->struct_mutex);
 
        if (event) {