]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
drm/omap: Set dispc_channel_connect from DSS output connect handlers
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 6 Mar 2018 22:28:18 +0000 (00:28 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 3 Sep 2018 13:13:28 +0000 (16:13 +0300)
The omap_dss_device.dispc_channel_connect field is used by DSS outputs
to fail the .enable() operation if they're not connected. Set the field
directly from the (dis)connect handlers of the DSS outputs instead of
going through the CRTC dss_mgr operations.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/omapdrm/dss/dpi.c
drivers/gpu/drm/omapdrm/dss/dsi.c
drivers/gpu/drm/omapdrm/dss/hdmi4.c
drivers/gpu/drm/omapdrm/dss/hdmi5.c
drivers/gpu/drm/omapdrm/dss/sdi.c
drivers/gpu/drm/omapdrm/dss/venc.c
drivers/gpu/drm/omapdrm/omap_crtc.c

index 178b463c2d60dadf556c72801ea576935fc545f4..5b04cc514c58df118173920a3149636ddf41be42 100644 (file)
@@ -626,12 +626,15 @@ static int dpi_connect(struct omap_dss_device *src,
                return r;
        }
 
+       dst->dispc_channel_connected = true;
        return 0;
 }
 
 static void dpi_disconnect(struct omap_dss_device *src,
                           struct omap_dss_device *dst)
 {
+       dst->dispc_channel_connected = false;
+
        omapdss_device_disconnect(dst, dst->next);
 
        dss_mgr_disconnect(dst);
index 948e3b8735234104080c8f78a9e3343963bffcc0..921e794aec0d848c3ddfbafa6310067249acab0c 100644 (file)
@@ -4896,12 +4896,15 @@ static int dsi_connect(struct omap_dss_device *src,
                return r;
        }
 
+       dst->dispc_channel_connected = true;
        return 0;
 }
 
 static void dsi_disconnect(struct omap_dss_device *src,
                           struct omap_dss_device *dst)
 {
+       dst->dispc_channel_connected = false;
+
        omapdss_device_disconnect(dst, dst->next);
 
        dss_mgr_disconnect(dst);
index 6616530d5fe685bf1238ec79fcc1f9fa20d53547..1e025a8b99c9962e55a31a75df0233b675a7a283 100644 (file)
@@ -443,12 +443,15 @@ static int hdmi_connect(struct omap_dss_device *src,
                return r;
        }
 
+       dst->dispc_channel_connected = true;
        return 0;
 }
 
 static void hdmi_disconnect(struct omap_dss_device *src,
                            struct omap_dss_device *dst)
 {
+       dst->dispc_channel_connected = false;
+
        omapdss_device_disconnect(dst, dst->next);
 
        dss_mgr_disconnect(dst);
index f7e15edc05fc8c9b254f7575dce3ce515e3a7f3f..d5860438ddd955833ce9e07b7124dbe5edc196de 100644 (file)
@@ -448,12 +448,15 @@ static int hdmi_connect(struct omap_dss_device *src,
                return r;
        }
 
+       dst->dispc_channel_connected = true;
        return 0;
 }
 
 static void hdmi_disconnect(struct omap_dss_device *src,
                            struct omap_dss_device *dst)
 {
+       dst->dispc_channel_connected = false;
+
        omapdss_device_disconnect(dst, dst->next);
 
        dss_mgr_disconnect(dst);
index 764299cafbe2d7d42a5d9c7b911d8b38fd116acd..b74188458e91f04abde17892c8713559dab42df7 100644 (file)
@@ -267,12 +267,15 @@ static int sdi_connect(struct omap_dss_device *src,
                return r;
        }
 
+       dst->dispc_channel_connected = true;
        return 0;
 }
 
 static void sdi_disconnect(struct omap_dss_device *src,
                           struct omap_dss_device *dst)
 {
+       dst->dispc_channel_connected = false;
+
        omapdss_device_disconnect(dst, dst->next);
 
        dss_mgr_disconnect(dst);
index c2811c42519533046885a96606e9be1735aa209b..00421e2a8eb6bc10413aebd82b4df39b640b55e1 100644 (file)
@@ -706,12 +706,15 @@ static int venc_connect(struct omap_dss_device *src,
                return r;
        }
 
+       dst->dispc_channel_connected = true;
        return 0;
 }
 
 static void venc_disconnect(struct omap_dss_device *src,
                            struct omap_dss_device *dst)
 {
+       dst->dispc_channel_connected = false;
+
        omapdss_device_disconnect(dst, dst->next);
 
        dss_mgr_disconnect(dst);
index 90917d040ddb914ae4af046f1625201e4ee457d5..7f837697e76c35f4a01e645e25d3281d0e04baf5 100644 (file)
@@ -114,8 +114,6 @@ static int omap_crtc_dss_connect(struct omap_drm_private *priv,
                enum omap_channel channel,
                struct omap_dss_device *dst)
 {
-       dst->dispc_channel_connected = true;
-
        return 0;
 }
 
@@ -123,7 +121,6 @@ static void omap_crtc_dss_disconnect(struct omap_drm_private *priv,
                enum omap_channel channel,
                struct omap_dss_device *dst)
 {
-       dst->dispc_channel_connected = false;
 }
 
 static void omap_crtc_dss_start_update(struct omap_drm_private *priv,