Skip to content

Commit

Permalink
drm/exynos: check crtc's dpms mode at SetCrtc
Browse files Browse the repository at this point in the history
when fb changing is requested, crtc's dpms mode should be on.
if not on, return -EPERM so that the hardware can't be accessed.
if user requesed dpms off and next SetCrtc with an another fb
then the hardware can be accessed with dpms off to write overlay
data onto some registers so this patch will prevent from accessing
the hardware with dpms off.

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 ef6223d commit 32aeab1
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 @@ -155,6 +155,12 @@ static int exynos_drm_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,

DRM_DEBUG_KMS("%s\n", __FILE__);

/* when framebuffer changing is requested, crtc's dpms should be on */
if (exynos_crtc->dpms > DRM_MODE_DPMS_ON) {
DRM_ERROR("failed framebuffer changing request.\n");
return -EPERM;
}

crtc_w = crtc->fb->width - x;
crtc_h = crtc->fb->height - y;

Expand Down

0 comments on commit 32aeab1

Please sign in to comment.