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/displays/panel-lgphilips-lb035q02.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/displays/panel-lgphilips-lb035q02.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c b/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c index 73416b1c7386..66763a12fc3d 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c @@ -115,36 +115,19 @@ static void init_lb035q02_panel(struct spi_device *spi) lb035q02_write_reg(spi, 0x3b, 0x0806); } -static int lb035q02_connect(struct omap_dss_device *dssdev) +static int lb035q02_connect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct panel_drv_data *ddata = to_panel_data(dssdev); - struct omap_dss_device *src; - int r; - - src = omapdss_of_find_connected_device(dssdev->dev->of_node, 0); - if (IS_ERR_OR_NULL(src)) { - dev_err(dssdev->dev, "failed to find video source\n"); - return src ? PTR_ERR(src) : -EINVAL; - } - - r = omapdss_device_connect(dssdev->dss, src, dssdev); - if (r) { - omapdss_device_put(src); - return r; - } + struct panel_drv_data *ddata = to_panel_data(dst); init_lb035q02_panel(ddata->spi); return 0; } -static void lb035q02_disconnect(struct omap_dss_device *dssdev) +static void lb035q02_disconnect(struct omap_dss_device *src, + struct omap_dss_device *dst) { - struct omap_dss_device *src = dssdev->src; - - omapdss_device_disconnect(src, dssdev); - - omapdss_device_put(src); } static int lb035q02_enable(struct omap_dss_device *dssdev) @@ -285,7 +268,6 @@ static int lb035q02_panel_spi_remove(struct spi_device *spi) omapdss_device_unregister(dssdev); lb035q02_disable(dssdev); - omapdss_device_disconnect(dssdev, NULL); return 0; } |