summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2014-04-03 17:30:03 +0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-04-14 13:34:14 +0400
commitc7aef12f344459961eb1e0ba10d184816ed42d99 (patch)
treeca68b7237c5a475f77bee0a2d1b47e4b97295f68 /drivers/gpu
parente2f8fd74ec1bf15cb2abc1b11f7d9fa09581024e (diff)
downloadlinux-c7aef12f344459961eb1e0ba10d184816ed42d99.tar.xz
drm/omap: fix missing disable for unused encoder
When an encoder is no longer connected to a crtc, the driver will leave the encoder enabled. This patch adds code to track the encoder used for a crtc, and when the encoder changes, the old one is disabled. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_crtc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
index 161a74a3ac5e..61d1c4897a45 100644
--- a/drivers/gpu/drm/omapdrm/omap_crtc.c
+++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
@@ -33,6 +33,7 @@ struct omap_crtc {
int pipe;
enum omap_channel channel;
struct omap_overlay_manager_info info;
+ struct drm_encoder *current_encoder;
/*
* Temporary: eventually this will go away, but it is needed
@@ -594,6 +595,11 @@ static void omap_crtc_pre_apply(struct omap_drm_apply *apply)
}
}
+ if (omap_crtc->current_encoder && encoder != omap_crtc->current_encoder)
+ omap_encoder_set_enabled(omap_crtc->current_encoder, false);
+
+ omap_crtc->current_encoder = encoder;
+
if (!omap_crtc->enabled) {
set_enabled(&omap_crtc->base, false);
if (encoder)