summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/displays
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-02-28 17:30:30 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-09-03 16:13:26 +0300
commitec727e3f61845d6d64b3c5eba464096d6cc7f8e9 (patch)
treecd9e3c70b61ef8302d672b7f693166c16a14c36e /drivers/gpu/drm/omapdrm/displays
parentb93109d7dc9e15649e1cf18281f02d8b4a102584 (diff)
drm/omap: dss: Add functions to connect and disconnect devices
The omap_dss_device objects model display components and are connected at runtime to create display pipelines. The connect and disconnect operations implemented by each component contain lots of duplicate code. As a first step towards fixing this, create new functions to wrap the direct calls to those operations and use them. 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>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/displays')
-rw-r--r--drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c4
-rw-r--r--drivers/gpu/drm/omapdrm/displays/connector-dvi.c4
-rw-r--r--drivers/gpu/drm/omapdrm/displays/connector-hdmi.c4
-rw-r--r--drivers/gpu/drm/omapdrm/displays/encoder-opa362.c4
-rw-r--r--drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c4
-rw-r--r--drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c4
-rw-r--r--drivers/gpu/drm/omapdrm/displays/panel-dpi.c4
-rw-r--r--drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c6
-rw-r--r--drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c4
-rw-r--r--drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c4
-rw-r--r--drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c4
-rw-r--r--drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c4
-rw-r--r--drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c4
-rw-r--r--drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c4
14 files changed, 29 insertions, 29 deletions
diff --git a/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c b/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c
index a94868d9398b..41ba3c5dbe7d 100644
--- a/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c
+++ b/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c
@@ -59,7 +59,7 @@ static int tvc_connect(struct omap_dss_device *dssdev)
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
@@ -79,7 +79,7 @@ static void tvc_disconnect(struct omap_dss_device *dssdev)
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
diff --git a/drivers/gpu/drm/omapdrm/displays/connector-dvi.c b/drivers/gpu/drm/omapdrm/displays/connector-dvi.c
index 021e3b651c89..f193bbda550c 100644
--- a/drivers/gpu/drm/omapdrm/displays/connector-dvi.c
+++ b/drivers/gpu/drm/omapdrm/displays/connector-dvi.c
@@ -72,7 +72,7 @@ static int dvic_connect(struct omap_dss_device *dssdev)
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
@@ -90,7 +90,7 @@ static void dvic_disconnect(struct omap_dss_device *dssdev)
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
diff --git a/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c b/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c
index b528bd51ada3..014554afbb0d 100644
--- a/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c
+++ b/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c
@@ -69,7 +69,7 @@ static int hdmic_connect(struct omap_dss_device *dssdev)
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
@@ -89,7 +89,7 @@ static void hdmic_disconnect(struct omap_dss_device *dssdev)
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
index 37982ffe0ad4..752b565987c1 100644
--- a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
+++ b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
@@ -50,7 +50,7 @@ static int opa362_connect(struct omap_dss_device *dssdev,
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
@@ -82,7 +82,7 @@ static void opa362_disconnect(struct omap_dss_device *dssdev,
dst->src = NULL;
dssdev->dst = NULL;
- in->ops->disconnect(in, &ddata->dssdev);
+ omapdss_device_disconnect(in, &ddata->dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c
index 1fbc5559e54f..a8660e5e5ffc 100644
--- a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c
+++ b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c
@@ -44,7 +44,7 @@ static int tfp410_connect(struct omap_dss_device *dssdev,
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
@@ -74,7 +74,7 @@ static void tfp410_disconnect(struct omap_dss_device *dssdev,
dst->src = NULL;
dssdev->dst = NULL;
- in->ops->disconnect(in, &ddata->dssdev);
+ omapdss_device_disconnect(in, &ddata->dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
index 21a4a2fd42bf..640f15b88467 100644
--- a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
+++ b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
@@ -49,7 +49,7 @@ static int tpd_connect(struct omap_dss_device *dssdev,
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
@@ -85,7 +85,7 @@ static void tpd_disconnect(struct omap_dss_device *dssdev,
dst->src = NULL;
dssdev->dst = NULL;
- in->ops->disconnect(in, &ddata->dssdev);
+ omapdss_device_disconnect(in, &ddata->dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c
index 15042351ace3..987519501336 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c
@@ -50,7 +50,7 @@ static int panel_dpi_connect(struct omap_dss_device *dssdev)
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
@@ -68,7 +68,7 @@ static void panel_dpi_disconnect(struct omap_dss_device *dssdev)
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
index 4296f4ca39fe..b7cd2ef17fbb 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
@@ -772,7 +772,7 @@ static int dsicm_connect(struct omap_dss_device *dssdev)
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
dev_err(dev, "Failed to connect to video source\n");
goto err_connect;
@@ -796,7 +796,7 @@ static int dsicm_connect(struct omap_dss_device *dssdev)
err_vc_id:
in->ops->dsi.release_vc(in, ddata->channel);
err_req_vc:
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
err_connect:
omap_dss_put_device(in);
return r;
@@ -811,7 +811,7 @@ static void dsicm_disconnect(struct omap_dss_device *dssdev)
return;
in->ops->dsi.release_vc(in, ddata->channel);
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c b/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c
index 8e293708261c..e4a3b5828bf9 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c
@@ -131,7 +131,7 @@ static int lb035q02_connect(struct omap_dss_device *dssdev)
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
@@ -151,7 +151,7 @@ static void lb035q02_disconnect(struct omap_dss_device *dssdev)
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c b/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c
index 7296c794326c..e89dd32a2a60 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c
@@ -127,7 +127,7 @@ static int nec_8048_connect(struct omap_dss_device *dssdev)
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
@@ -145,7 +145,7 @@ static void nec_8048_disconnect(struct omap_dss_device *dssdev)
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c b/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
index 00291b9ecfde..d0451cfab7f8 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
@@ -73,7 +73,7 @@ static int sharp_ls_connect(struct omap_dss_device *dssdev)
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
@@ -91,7 +91,7 @@ static void sharp_ls_disconnect(struct omap_dss_device *dssdev)
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c b/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c
index 694ac42b7247..9033e9d25b7f 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c
@@ -522,7 +522,7 @@ static int acx565akm_connect(struct omap_dss_device *dssdev)
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
@@ -540,7 +540,7 @@ static void acx565akm_disconnect(struct omap_dss_device *dssdev)
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c
index 3cd1e4ccd43a..8865459b6c90 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c
@@ -181,7 +181,7 @@ static int td028ttec1_panel_connect(struct omap_dss_device *dssdev)
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
@@ -199,7 +199,7 @@ static void td028ttec1_panel_disconnect(struct omap_dss_device *dssdev)
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c
index de1140314a7a..1daba7a60a9c 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c
@@ -352,7 +352,7 @@ static int tpo_td043_connect(struct omap_dss_device *dssdev)
return PTR_ERR(in);
}
- r = in->ops->connect(in, dssdev);
+ r = omapdss_device_connect(in, dssdev);
if (r) {
omap_dss_put_device(in);
return r;
@@ -370,7 +370,7 @@ static void tpo_td043_disconnect(struct omap_dss_device *dssdev)
if (!omapdss_device_is_connected(dssdev))
return;
- in->ops->disconnect(in, dssdev);
+ omapdss_device_disconnect(in, dssdev);
omap_dss_put_device(in);
ddata->in = NULL;