[PATCH 21/42] drm/omap: add dispc_channel_connected field to omap_dss_device

Tomi Valkeinen tomi.valkeinen at ti.com
Mon Feb 22 17:10:27 UTC 2016


We want to remove the 'struct omap_overlay_manager' from
omap_dss_device. At the moment that field is used, among some other
uses, to see if the omap_dss_device is connected to an overlay manager.

To make it possible to remove the 'struct omap_overlay_manager' field,
this patch adds 'bool dispc_channel_connected' field to track the
connected-or-not status.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ti.com>
---
 drivers/gpu/drm/omapdrm/omap_crtc.c | 2 ++
 include/video/omapdss.h             | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
index 9cc1c4ef79a5..f195641b510c 100644
--- a/drivers/gpu/drm/omapdrm/omap_crtc.c
+++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
@@ -107,6 +107,7 @@ static int omap_crtc_dss_connect(enum omap_channel channel,
 		return -EINVAL;
 
 	omap_crtc_output[channel] = dst;
+	dst->dispc_channel_connected = true;
 
 	dst->manager = mgr;
 	mgr->output = dst;
@@ -120,6 +121,7 @@ static void omap_crtc_dss_disconnect(enum omap_channel channel,
 	struct omap_overlay_manager *mgr = omap_dss_get_overlay_manager(channel);
 
 	omap_crtc_output[channel] = NULL;
+	dst->dispc_channel_connected = false;
 
 	mgr->output->manager = NULL;
 	mgr->output = NULL;
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index b50ebcd2f460..8e14ad7327c9 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -770,6 +770,7 @@ struct omap_dss_device {
 
 	/* DISPC channel for this output */
 	enum omap_channel dispc_channel;
+	bool dispc_channel_connected;
 
 	/* output instance */
 	enum omap_dss_output_id id;
-- 
2.5.0



More information about the dri-devel mailing list