From ef6223dc6bab64c99b5c869b652fa13436afc38a Mon Sep 17 00:00:00 2001 From: Inki Dae Date: Tue, 11 Sep 2012 18:25:21 +0900 Subject: [PATCH] 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 Signed-off-by: Kyungmin Park --- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index 8bd4d7ed964b..07c5d2a0bdc0 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) { -- GitLab