aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-03-06 17:28:18 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-09-03 09:13:28 -0400
commit0f37938c7c432c7737d85940475bcbd3c362447e (patch)
tree900f9b1f60011327c69d4ab0b3af21311e3d7e6d
parentd25a7d67465faa28062323d46a1d755d3ae6abc6 (diff)
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: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/gpu/drm/omapdrm/dss/dpi.c3
-rw-r--r--drivers/gpu/drm/omapdrm/dss/dsi.c3
-rw-r--r--drivers/gpu/drm/omapdrm/dss/hdmi4.c3
-rw-r--r--drivers/gpu/drm/omapdrm/dss/hdmi5.c3
-rw-r--r--drivers/gpu/drm/omapdrm/dss/sdi.c3
-rw-r--r--drivers/gpu/drm/omapdrm/dss/venc.c3
-rw-r--r--drivers/gpu/drm/omapdrm/omap_crtc.c3
7 files changed, 18 insertions, 3 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c
index 178b463c2d60..5b04cc514c58 100644
--- a/drivers/gpu/drm/omapdrm/dss/dpi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dpi.c
@@ -626,12 +626,15 @@ static int dpi_connect(struct omap_dss_device *src,
626 return r; 626 return r;
627 } 627 }
628 628
629 dst->dispc_channel_connected = true;
629 return 0; 630 return 0;
630} 631}
631 632
632static void dpi_disconnect(struct omap_dss_device *src, 633static void dpi_disconnect(struct omap_dss_device *src,
633 struct omap_dss_device *dst) 634 struct omap_dss_device *dst)
634{ 635{
636 dst->dispc_channel_connected = false;
637
635 omapdss_device_disconnect(dst, dst->next); 638 omapdss_device_disconnect(dst, dst->next);
636 639
637 dss_mgr_disconnect(dst); 640 dss_mgr_disconnect(dst);
diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
index 948e3b873523..921e794aec0d 100644
--- a/drivers/gpu/drm/omapdrm/dss/dsi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
@@ -4896,12 +4896,15 @@ static int dsi_connect(struct omap_dss_device *src,
4896 return r; 4896 return r;
4897 } 4897 }
4898 4898
4899 dst->dispc_channel_connected = true;
4899 return 0; 4900 return 0;
4900} 4901}
4901 4902
4902static void dsi_disconnect(struct omap_dss_device *src, 4903static void dsi_disconnect(struct omap_dss_device *src,
4903 struct omap_dss_device *dst) 4904 struct omap_dss_device *dst)
4904{ 4905{
4906 dst->dispc_channel_connected = false;
4907
4905 omapdss_device_disconnect(dst, dst->next); 4908 omapdss_device_disconnect(dst, dst->next);
4906 4909
4907 dss_mgr_disconnect(dst); 4910 dss_mgr_disconnect(dst);
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c b/drivers/gpu/drm/omapdrm/dss/hdmi4.c
index 6616530d5fe6..1e025a8b99c9 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c
@@ -443,12 +443,15 @@ static int hdmi_connect(struct omap_dss_device *src,
443 return r; 443 return r;
444 } 444 }
445 445
446 dst->dispc_channel_connected = true;
446 return 0; 447 return 0;
447} 448}
448 449
449static void hdmi_disconnect(struct omap_dss_device *src, 450static void hdmi_disconnect(struct omap_dss_device *src,
450 struct omap_dss_device *dst) 451 struct omap_dss_device *dst)
451{ 452{
453 dst->dispc_channel_connected = false;
454
452 omapdss_device_disconnect(dst, dst->next); 455 omapdss_device_disconnect(dst, dst->next);
453 456
454 dss_mgr_disconnect(dst); 457 dss_mgr_disconnect(dst);
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5.c b/drivers/gpu/drm/omapdrm/dss/hdmi5.c
index f7e15edc05fc..d5860438ddd9 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi5.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi5.c
@@ -448,12 +448,15 @@ static int hdmi_connect(struct omap_dss_device *src,
448 return r; 448 return r;
449 } 449 }
450 450
451 dst->dispc_channel_connected = true;
451 return 0; 452 return 0;
452} 453}
453 454
454static void hdmi_disconnect(struct omap_dss_device *src, 455static void hdmi_disconnect(struct omap_dss_device *src,
455 struct omap_dss_device *dst) 456 struct omap_dss_device *dst)
456{ 457{
458 dst->dispc_channel_connected = false;
459
457 omapdss_device_disconnect(dst, dst->next); 460 omapdss_device_disconnect(dst, dst->next);
458 461
459 dss_mgr_disconnect(dst); 462 dss_mgr_disconnect(dst);
diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c
index 764299cafbe2..b74188458e91 100644
--- a/drivers/gpu/drm/omapdrm/dss/sdi.c
+++ b/drivers/gpu/drm/omapdrm/dss/sdi.c
@@ -267,12 +267,15 @@ static int sdi_connect(struct omap_dss_device *src,
267 return r; 267 return r;
268 } 268 }
269 269
270 dst->dispc_channel_connected = true;
270 return 0; 271 return 0;
271} 272}
272 273
273static void sdi_disconnect(struct omap_dss_device *src, 274static void sdi_disconnect(struct omap_dss_device *src,
274 struct omap_dss_device *dst) 275 struct omap_dss_device *dst)
275{ 276{
277 dst->dispc_channel_connected = false;
278
276 omapdss_device_disconnect(dst, dst->next); 279 omapdss_device_disconnect(dst, dst->next);
277 280
278 dss_mgr_disconnect(dst); 281 dss_mgr_disconnect(dst);
diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c b/drivers/gpu/drm/omapdrm/dss/venc.c
index c2811c425195..00421e2a8eb6 100644
--- a/drivers/gpu/drm/omapdrm/dss/venc.c
+++ b/drivers/gpu/drm/omapdrm/dss/venc.c
@@ -706,12 +706,15 @@ static int venc_connect(struct omap_dss_device *src,
706 return r; 706 return r;
707 } 707 }
708 708
709 dst->dispc_channel_connected = true;
709 return 0; 710 return 0;
710} 711}
711 712
712static void venc_disconnect(struct omap_dss_device *src, 713static void venc_disconnect(struct omap_dss_device *src,
713 struct omap_dss_device *dst) 714 struct omap_dss_device *dst)
714{ 715{
716 dst->dispc_channel_connected = false;
717
715 omapdss_device_disconnect(dst, dst->next); 718 omapdss_device_disconnect(dst, dst->next);
716 719
717 dss_mgr_disconnect(dst); 720 dss_mgr_disconnect(dst);
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
index 90917d040ddb..7f837697e76c 100644
--- a/drivers/gpu/drm/omapdrm/omap_crtc.c
+++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
@@ -114,8 +114,6 @@ static int omap_crtc_dss_connect(struct omap_drm_private *priv,
114 enum omap_channel channel, 114 enum omap_channel channel,
115 struct omap_dss_device *dst) 115 struct omap_dss_device *dst)
116{ 116{
117 dst->dispc_channel_connected = true;
118
119 return 0; 117 return 0;
120} 118}
121 119
@@ -123,7 +121,6 @@ static void omap_crtc_dss_disconnect(struct omap_drm_private *priv,
123 enum omap_channel channel, 121 enum omap_channel channel,
124 struct omap_dss_device *dst) 122 struct omap_dss_device *dst)
125{ 123{
126 dst->dispc_channel_connected = false;
127} 124}
128 125
129static void omap_crtc_dss_start_update(struct omap_drm_private *priv, 126static void omap_crtc_dss_start_update(struct omap_drm_private *priv,