Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/bridge: cdns-dsi: Move to devm_drm_of_get_bridge()

Instead of manually finding the next bridge/panel, and maintaining the
panel-bridge (in-case the next entity is a panel), switch to using the
automatically managing devm_drm_of_get_bridge() API.

Drop the drm_panel support completely from the driver while at it.

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Aradhya Bhatia <a-bhatia1@ti.com>
Signed-off-by: Aradhya Bhatia <aradhya.bhatia@linux.dev>
Link: https://lore.kernel.org/r/20250329113925.68204-7-aradhya.bhatia@linux.dev
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>

authored by

Aradhya Bhatia and committed by
Dmitry Baryshkov
7ad8b344 47c03e66

+3 -27
+3 -25
drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c
··· 955 955 struct cdns_dsi_output *output = &dsi->output; 956 956 struct cdns_dsi_input *input = &dsi->input; 957 957 struct drm_bridge *bridge; 958 - struct drm_panel *panel; 959 - struct device_node *np; 960 958 int ret; 961 959 962 960 /* ··· 972 974 /* 973 975 * The host <-> device link might be described using an OF-graph 974 976 * representation, in this case we extract the device of_node from 975 - * this representation, otherwise we use dsidev->dev.of_node which 976 - * should have been filled by the core. 977 + * this representation. 977 978 */ 978 - np = of_graph_get_remote_node(dsi->base.dev->of_node, DSI_OUTPUT_PORT, 979 - dev->channel); 980 - if (!np) 981 - np = of_node_get(dev->dev.of_node); 982 - 983 - panel = of_drm_find_panel(np); 984 - if (!IS_ERR(panel)) { 985 - bridge = drm_panel_bridge_add_typed(panel, 986 - DRM_MODE_CONNECTOR_DSI); 987 - } else { 988 - bridge = of_drm_find_bridge(np); 989 - if (!bridge) 990 - bridge = ERR_PTR(-EINVAL); 991 - } 992 - 993 - of_node_put(np); 994 - 979 + bridge = devm_drm_of_get_bridge(dsi->base.dev, dsi->base.dev->of_node, 980 + DSI_OUTPUT_PORT, dev->channel); 995 981 if (IS_ERR(bridge)) { 996 982 ret = PTR_ERR(bridge); 997 983 dev_err(host->dev, "failed to add DSI device %s (err = %d)", ··· 985 1003 986 1004 output->dev = dev; 987 1005 output->bridge = bridge; 988 - output->panel = panel; 989 1006 990 1007 /* 991 1008 * The DSI output has been properly configured, we can now safely ··· 1000 1019 struct mipi_dsi_device *dev) 1001 1020 { 1002 1021 struct cdns_dsi *dsi = to_cdns_dsi(host); 1003 - struct cdns_dsi_output *output = &dsi->output; 1004 1022 struct cdns_dsi_input *input = &dsi->input; 1005 1023 1006 1024 drm_bridge_remove(&input->bridge); 1007 - if (output->panel) 1008 - drm_panel_bridge_remove(output->bridge); 1009 1025 1010 1026 return 0; 1011 1027 }
-2
drivers/gpu/drm/bridge/cadence/cdns-dsi-core.h
··· 10 10 11 11 #include <drm/drm_bridge.h> 12 12 #include <drm/drm_mipi_dsi.h> 13 - #include <drm/drm_panel.h> 14 13 15 14 #include <linux/bits.h> 16 15 #include <linux/completion.h> ··· 20 21 21 22 struct cdns_dsi_output { 22 23 struct mipi_dsi_device *dev; 23 - struct drm_panel *panel; 24 24 struct drm_bridge *bridge; 25 25 union phy_configure_opts phy_opts; 26 26 };