Skip to content

Commit

Permalink
drm/exynos: check crtc's dpms mode at page flip
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Inki Dae committed Oct 4, 2012
1 parent 471d60f commit ef6223d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/gpu/drm/exynos/exynos_drm_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ef6223d

Please sign in to comment.