Commit 32aeab17 authored by Inki Dae's avatar Inki Dae
Browse files

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: default avatarInki Dae <>
Signed-off-by: default avatarKyungmin Park <>
parent ef6223dc
......@@ -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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment