mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
drm/bridge: samsung-dsim: don't create a panel_bridge
Now a panel_bridge is automatically created for every drm_panel and the panel-bridge API is just a deprecated wrapper to access it. Update and simplify the code by just getting a reference to the already-existing bridge using of_drm_find_and_get_bridge(). Acked-by: Maxime Ripard <mripard@kernel.org> Link: https://patch.msgid.link/20260916-drm-bridge-every-panel-v3-14-83afb4f1a707@bootlin.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
This commit is contained in:
parent
802372cf31
commit
f763a25c44
|
|
@ -302,7 +302,6 @@ config DRM_SAMSUNG_DSIM
|
|||
depends on OF && HAS_IOMEM
|
||||
select DRM_KMS_HELPER
|
||||
select DRM_MIPI_DSI
|
||||
select DRM_PANEL_BRIDGE
|
||||
select GENERIC_PHY
|
||||
select GENERIC_PHY_MIPI_DPHY
|
||||
help
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
#include <video/mipi_display.h>
|
||||
|
||||
#include <drm/bridge/samsung-dsim.h>
|
||||
#include <drm/drm_panel.h>
|
||||
#include <drm/drm_print.h>
|
||||
|
||||
/* returns true iff both arguments logically differs */
|
||||
|
|
@ -1898,7 +1897,6 @@ static int samsung_dsim_host_attach(struct mipi_dsi_host *host,
|
|||
struct device *dev = dsi->dev;
|
||||
struct device_node *np = dev->of_node;
|
||||
struct device_node *remote;
|
||||
struct drm_panel *panel;
|
||||
int ret = 0;
|
||||
|
||||
/*
|
||||
|
|
@ -1913,7 +1911,7 @@ static int samsung_dsim_host_attach(struct mipi_dsi_host *host,
|
|||
of_node_name_eq(remote, "ports"))
|
||||
continue;
|
||||
|
||||
goto of_find_panel_or_bridge;
|
||||
goto of_find_bridge;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1927,25 +1925,13 @@ static int samsung_dsim_host_attach(struct mipi_dsi_host *host,
|
|||
|
||||
remote = of_graph_get_remote_node(np, 1, 0);
|
||||
|
||||
of_find_panel_or_bridge:
|
||||
of_find_bridge:
|
||||
if (!remote)
|
||||
return -ENODEV;
|
||||
|
||||
panel = of_drm_find_panel(remote);
|
||||
if (!IS_ERR(panel)) {
|
||||
next_bridge = devm_drm_panel_bridge_add(dev, panel);
|
||||
drm_panel_put(panel);
|
||||
if (IS_ERR(next_bridge)) {
|
||||
ret = PTR_ERR(next_bridge);
|
||||
next_bridge = NULL; // Inhibit the cleanup action on an ERR_PTR
|
||||
} else {
|
||||
drm_bridge_get(next_bridge);
|
||||
}
|
||||
} else {
|
||||
next_bridge = of_drm_find_and_get_bridge(remote);
|
||||
if (!next_bridge)
|
||||
ret = -EINVAL;
|
||||
}
|
||||
next_bridge = of_drm_find_and_get_bridge(remote);
|
||||
if (!next_bridge)
|
||||
ret = -EINVAL;
|
||||
|
||||
of_node_put(remote);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user