diff options
author | Inki Dae <inki.dae@samsung.com> | 2012-09-14 13:29:47 +0900 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2012-10-04 10:06:01 +0900 |
commit | 32aeab17457c13e6a448ba0f6f3c03d6705e5592 (patch) | |
tree | 7f3ce1f949cd109e27dd7e77c14d1d1047cb5b80 /drivers/gpu | |
parent | ef6223dc6bab64c99b5c869b652fa13436afc38a (diff) |
drm/exynos: check crtc's dpms mode at SetCrtc
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>
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 07c5d2a0bdc0..ac004a3288da 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c @@ -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; |