Commit 0f37938c authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Tomi Valkeinen

drm/omap: Set dispc_channel_connect from DSS output connect handlers

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: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent d25a7d67
...@@ -626,12 +626,15 @@ static int dpi_connect(struct omap_dss_device *src, ...@@ -626,12 +626,15 @@ static int dpi_connect(struct omap_dss_device *src,
return r; return r;
} }
dst->dispc_channel_connected = true;
return 0; return 0;
} }
static void dpi_disconnect(struct omap_dss_device *src, static void dpi_disconnect(struct omap_dss_device *src,
struct omap_dss_device *dst) struct omap_dss_device *dst)
{ {
dst->dispc_channel_connected = false;
omapdss_device_disconnect(dst, dst->next); omapdss_device_disconnect(dst, dst->next);
dss_mgr_disconnect(dst); dss_mgr_disconnect(dst);
......
...@@ -4896,12 +4896,15 @@ static int dsi_connect(struct omap_dss_device *src, ...@@ -4896,12 +4896,15 @@ static int dsi_connect(struct omap_dss_device *src,
return r; return r;
} }
dst->dispc_channel_connected = true;
return 0; return 0;
} }
static void dsi_disconnect(struct omap_dss_device *src, static void dsi_disconnect(struct omap_dss_device *src,
struct omap_dss_device *dst) struct omap_dss_device *dst)
{ {
dst->dispc_channel_connected = false;
omapdss_device_disconnect(dst, dst->next); omapdss_device_disconnect(dst, dst->next);
dss_mgr_disconnect(dst); dss_mgr_disconnect(dst);
......
...@@ -443,12 +443,15 @@ static int hdmi_connect(struct omap_dss_device *src, ...@@ -443,12 +443,15 @@ static int hdmi_connect(struct omap_dss_device *src,
return r; return r;
} }
dst->dispc_channel_connected = true;
return 0; return 0;
} }
static void hdmi_disconnect(struct omap_dss_device *src, static void hdmi_disconnect(struct omap_dss_device *src,
struct omap_dss_device *dst) struct omap_dss_device *dst)
{ {
dst->dispc_channel_connected = false;
omapdss_device_disconnect(dst, dst->next); omapdss_device_disconnect(dst, dst->next);
dss_mgr_disconnect(dst); dss_mgr_disconnect(dst);
......
...@@ -448,12 +448,15 @@ static int hdmi_connect(struct omap_dss_device *src, ...@@ -448,12 +448,15 @@ static int hdmi_connect(struct omap_dss_device *src,
return r; return r;
} }
dst->dispc_channel_connected = true;
return 0; return 0;
} }
static void hdmi_disconnect(struct omap_dss_device *src, static void hdmi_disconnect(struct omap_dss_device *src,
struct omap_dss_device *dst) struct omap_dss_device *dst)
{ {
dst->dispc_channel_connected = false;
omapdss_device_disconnect(dst, dst->next); omapdss_device_disconnect(dst, dst->next);
dss_mgr_disconnect(dst); dss_mgr_disconnect(dst);
......
...@@ -267,12 +267,15 @@ static int sdi_connect(struct omap_dss_device *src, ...@@ -267,12 +267,15 @@ static int sdi_connect(struct omap_dss_device *src,
return r; return r;
} }
dst->dispc_channel_connected = true;
return 0; return 0;
} }
static void sdi_disconnect(struct omap_dss_device *src, static void sdi_disconnect(struct omap_dss_device *src,
struct omap_dss_device *dst) struct omap_dss_device *dst)
{ {
dst->dispc_channel_connected = false;
omapdss_device_disconnect(dst, dst->next); omapdss_device_disconnect(dst, dst->next);
dss_mgr_disconnect(dst); dss_mgr_disconnect(dst);
......
...@@ -706,12 +706,15 @@ static int venc_connect(struct omap_dss_device *src, ...@@ -706,12 +706,15 @@ static int venc_connect(struct omap_dss_device *src,
return r; return r;
} }
dst->dispc_channel_connected = true;
return 0; return 0;
} }
static void venc_disconnect(struct omap_dss_device *src, static void venc_disconnect(struct omap_dss_device *src,
struct omap_dss_device *dst) struct omap_dss_device *dst)
{ {
dst->dispc_channel_connected = false;
omapdss_device_disconnect(dst, dst->next); omapdss_device_disconnect(dst, dst->next);
dss_mgr_disconnect(dst); dss_mgr_disconnect(dst);
......
...@@ -114,8 +114,6 @@ static int omap_crtc_dss_connect(struct omap_drm_private *priv, ...@@ -114,8 +114,6 @@ static int omap_crtc_dss_connect(struct omap_drm_private *priv,
enum omap_channel channel, enum omap_channel channel,
struct omap_dss_device *dst) struct omap_dss_device *dst)
{ {
dst->dispc_channel_connected = true;
return 0; return 0;
} }
...@@ -123,7 +121,6 @@ static void omap_crtc_dss_disconnect(struct omap_drm_private *priv, ...@@ -123,7 +121,6 @@ static void omap_crtc_dss_disconnect(struct omap_drm_private *priv,
enum omap_channel channel, enum omap_channel channel,
struct omap_dss_device *dst) struct omap_dss_device *dst)
{ {
dst->dispc_channel_connected = false;
} }
static void omap_crtc_dss_start_update(struct omap_drm_private *priv, static void omap_crtc_dss_start_update(struct omap_drm_private *priv,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment