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>
This commit is contained in:
Laurent Pinchart
2018-02-28 17:30:30 +02:00
committed by Tomi Valkeinen
parent b93109d7dc
commit ec727e3f61
17 changed files with 55 additions and 31 deletions

View File

@@ -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;