diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2018-03-05 00:42:36 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2018-09-03 16:13:27 +0300 |
commit | 511afb44d72aa7b6b871fa71f829afaaa27e84f0 (patch) | |
tree | e5c3c1fced5108a88c1bd06e0f3b98a6aa082e94 /drivers/gpu/drm/omapdrm/dss/dpi.c | |
parent | 2ee767922e1bc7ede9ceb7aed9a14141480836a7 (diff) | |
download | linux-511afb44d72aa7b6b871fa71f829afaaa27e84f0.tar.xz |
drm/omap: Reverse direction of DSS device (dis)connect operations
The omapdrm and omapdss drivers are architectured based on display
pipelines made of multiple components handled from sink (display) to
source (DSS output). This is incompatible with the DRM bridge and panel
APIs that handle components from source to sink.
To reconcile the omapdrm and omapdss drivers with the DRM bridge and
panel model, we need to reverse the direction of the DSS device
operations. Start with the connect and disconnect operations.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss/dpi.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/dss/dpi.c | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c index 35d63c686393..6bd0fd12883e 100644 --- a/drivers/gpu/drm/omapdrm/dss/dpi.c +++ b/drivers/gpu/drm/omapdrm/dss/dpi.c @@ -608,35 +608,45 @@ static enum omap_channel dpi_get_channel(struct dpi_data *dpi) } } -static int dpi_connect(struct omap_dss_device *dssdev, - struct omap_dss_device *dst) +static int dpi_connect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct dpi_data *dpi = dpi_get_data_from_dssdev(dssdev); + struct dpi_data *dpi = dpi_get_data_from_dssdev(dst); int r; dpi_init_pll(dpi); - r = dss_mgr_connect(dssdev); + r = dss_mgr_connect(dst); if (r) return r; - r = omapdss_output_set_device(dssdev, dst); + r = omapdss_output_set_device(dst, dst->next); if (r) { DSSERR("failed to connect output to new device: %s\n", dst->name); - dss_mgr_disconnect(dssdev); - return r; + goto err_mgr_disconnect; } + r = omapdss_device_connect(dst->dss, dst, dst->next); + if (r) + goto err_output_unset; + return 0; + +err_output_unset: + omapdss_output_unset_device(dst); +err_mgr_disconnect: + dss_mgr_disconnect(dst); + return r; } -static void dpi_disconnect(struct omap_dss_device *dssdev, - struct omap_dss_device *dst) +static void dpi_disconnect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - omapdss_output_unset_device(dssdev); + omapdss_device_disconnect(dst, dst->next); + omapdss_output_unset_device(dst); - dss_mgr_disconnect(dssdev); + dss_mgr_disconnect(dst); } static const struct omap_dss_device_ops dpi_ops = { |