summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/exynos/exynos_drm_crtc.c
diff options
context:
space:
mode:
authorInki Dae <inki.dae@samsung.com>2012-09-11 09:25:21 (GMT)
committerInki Dae <inki.dae@samsung.com>2012-10-04 01:06:01 (GMT)
commitef6223dc6bab64c99b5c869b652fa13436afc38a (patch)
tree1540d626a6f3a3dc1f5a858ab2451a7f7af32b60 /drivers/gpu/drm/exynos/exynos_drm_crtc.c
parent471d60fe594ed1a7ae28a3f911d1200ae51efbdc (diff)
downloadlinux-fsl-qoriq-ef6223dc6bab64c99b5c869b652fa13436afc38a.tar.xz
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 -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>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_crtc.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_crtc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index 8bd4d7e..07c5d2a 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -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) {