drm/omap: add dispc_channel_connected field to omap_dss_device
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 5 Nov 2015 07:34:31 +0000 (09:34 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 3 Mar 2016 15:38:22 +0000 (17:38 +0200)
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@ti.com>
drivers/gpu/drm/omapdrm/omap_crtc.c
include/video/omapdss.h

index cb5a30e3109d5baee6a04933609ee850cf3d1093..3667ff1d8474ec28fde1054ca30365c0b099d55c 100644 (file)
@@ -111,6 +111,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;
@@ -124,6 +125,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;
index b50ebcd2f460ebd96b072dd19e05be83b9071ef3..8e14ad7327c98af67e4f8ac18bfc07122a99ef77 100644 (file)
@@ -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;