drm/bridge: Make the bridge chain a double-linked list
So that each element in the chain can easily access its predecessor. This will be needed to support bus format negotiation between elements of the bridge chain. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191203141515.3597631-5-boris.brezillon@collabora.com
This commit is contained in:
@@ -255,6 +255,7 @@ struct exynos_dsi {
|
||||
struct mipi_dsi_host dsi_host;
|
||||
struct drm_connector connector;
|
||||
struct drm_panel *panel;
|
||||
struct list_head bridge_chain;
|
||||
struct drm_bridge *out_bridge;
|
||||
struct device *dev;
|
||||
|
||||
@@ -1522,7 +1523,7 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host,
|
||||
if (out_bridge) {
|
||||
drm_bridge_attach(encoder, out_bridge, NULL);
|
||||
dsi->out_bridge = out_bridge;
|
||||
encoder->bridge = NULL;
|
||||
list_splice(&encoder->bridge_chain, &dsi->bridge_chain);
|
||||
} else {
|
||||
int ret = exynos_dsi_create_connector(encoder);
|
||||
|
||||
@@ -1588,6 +1589,7 @@ static int exynos_dsi_host_detach(struct mipi_dsi_host *host,
|
||||
if (dsi->out_bridge->funcs->detach)
|
||||
dsi->out_bridge->funcs->detach(dsi->out_bridge);
|
||||
dsi->out_bridge = NULL;
|
||||
INIT_LIST_HEAD(&dsi->bridge_chain);
|
||||
}
|
||||
|
||||
if (drm->mode_config.poll_enabled)
|
||||
@@ -1735,6 +1737,7 @@ static int exynos_dsi_probe(struct platform_device *pdev)
|
||||
init_completion(&dsi->completed);
|
||||
spin_lock_init(&dsi->transfer_lock);
|
||||
INIT_LIST_HEAD(&dsi->transfer_list);
|
||||
INIT_LIST_HEAD(&dsi->bridge_chain);
|
||||
|
||||
dsi->dsi_host.ops = &exynos_dsi_ops;
|
||||
dsi->dsi_host.dev = dev;
|
||||
|
Reference in New Issue
Block a user