Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec727e3f authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Tomi Valkeinen
Browse files

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: 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 b93109d7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
+2 −2
Original line number Diff line number Diff line
@@ -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;
+2 −2
Original line number Diff line number Diff line
@@ -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;
+2 −2
Original line number Diff line number Diff line
@@ -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;
+2 −2
Original line number Diff line number Diff line
@@ -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;
Loading