diff options
author | Inki Dae <inki.dae@samsung.com> | 2012-09-11 18:25:21 +0900 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2012-10-04 10:06:01 +0900 |
commit | ef6223dc6bab64c99b5c869b652fa13436afc38a (patch) | |
tree | 1540d626a6f3a3dc1f5a858ab2451a7f7af32b60 /drivers/gpu | |
parent | 471d60fe594ed1a7ae28a3f911d1200ae51efbdc (diff) | |
download | talos-obmc-linux-ef6223dc6bab64c99b5c869b652fa13436afc38a.tar.gz talos-obmc-linux-ef6223dc6bab64c99b5c869b652fa13436afc38a.zip |
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')
-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 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) { |