diff options
author | Inki Dae <inki.dae@samsung.com> | 2012-09-11 05:25:21 -0400 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2012-10-03 21:06:01 -0400 |
commit | ef6223dc6bab64c99b5c869b652fa13436afc38a (patch) | |
tree | 1540d626a6f3a3dc1f5a858ab2451a7f7af32b60 /drivers/gpu/drm | |
parent | 471d60fe594ed1a7ae28a3f911d1200ae51efbdc (diff) |
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')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_crtc.c | 6 |
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 8bd4d7ed964..07c5d2a0bdc 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, | |||
207 | 207 | ||
208 | DRM_DEBUG_KMS("%s\n", __FILE__); | 208 | DRM_DEBUG_KMS("%s\n", __FILE__); |
209 | 209 | ||
210 | /* when the page flip is requested, crtc's dpms should be on */ | ||
211 | if (exynos_crtc->dpms > DRM_MODE_DPMS_ON) { | ||
212 | DRM_ERROR("failed page flip request.\n"); | ||
213 | return -EINVAL; | ||
214 | } | ||
215 | |||
210 | mutex_lock(&dev->struct_mutex); | 216 | mutex_lock(&dev->struct_mutex); |
211 | 217 | ||
212 | if (event) { | 218 | if (event) { |