All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/omap: fix missing disable for unused encoder
@ 2014-04-03 13:45 Tomi Valkeinen
  2014-04-03 13:45 ` [PATCH 2/3] drm/omap: fix enabling/disabling of video pipeline Tomi Valkeinen
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Tomi Valkeinen @ 2014-04-03 13:45 UTC (permalink / raw)
  To: Rob Clark, Archit Taneja, dri-devel; +Cc: Tomi Valkeinen

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>
---
 drivers/gpu/drm/omapdrm/omap_crtc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
index 4f624c59a660..beccff2ccf84 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
@@ -593,6 +594,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)
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-04-03 15:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-03 13:45 [PATCH 1/3] drm/omap: fix missing disable for unused encoder Tomi Valkeinen
2014-04-03 13:45 ` [PATCH 2/3] drm/omap: fix enabling/disabling of video pipeline Tomi Valkeinen
2014-04-03 14:58   ` Rob Clark
2014-04-03 15:37     ` Tomi Valkeinen
2014-04-03 13:45 ` [PATCH 3/3] OMAPDSS: HDMI: fix interlace output Tomi Valkeinen
2014-04-03 14:53 ` [PATCH 1/3] drm/omap: fix missing disable for unused encoder Rob Clark

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.