drm/omap: dss: 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_get_bridge_by_endpoint().

Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://patch.msgid.link/20260916-drm-bridge-every-panel-v3-17-83afb4f1a707@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
This commit is contained in:
Luca Ceresoli 2026-09-16 15:45:41 +02:00
parent 554d36acf5
commit b7e9b93fc8
2 changed files with 4 additions and 39 deletions

View File

@ -204,7 +204,6 @@ struct omap_dss_device {
struct dss_device *dss;
struct drm_bridge *bridge;
struct drm_bridge *next_bridge;
struct drm_panel *panel;
struct list_head list;

View File

@ -12,7 +12,6 @@
#include <linux/of_graph.h>
#include <drm/drm_bridge.h>
#include <drm/drm_panel.h>
#include "dss.h"
#include "omapdss.h"
@ -20,40 +19,16 @@
int omapdss_device_init_output(struct omap_dss_device *out,
struct drm_bridge *local_bridge)
{
struct device_node *remote_node;
struct drm_bridge *bridge;
int ret;
remote_node = of_graph_get_remote_node(out->dev->of_node,
out->of_port, 0);
if (!remote_node) {
bridge = of_drm_get_bridge_by_endpoint(out->dev->of_node, out->of_port, 0);
if (IS_ERR(bridge)) {
dev_dbg(out->dev, "failed to find video sink\n");
return 0;
}
out->panel = of_drm_find_panel(remote_node);
if (IS_ERR(out->panel))
out->panel = NULL;
if (!out->panel)
out->bridge = of_drm_find_and_get_bridge(remote_node);
of_node_put(remote_node);
if (out->panel) {
struct drm_bridge *bridge;
bridge = drm_panel_bridge_add(out->panel);
drm_panel_put(out->panel);
if (IS_ERR(bridge)) {
dev_err(out->dev,
"unable to create panel bridge (%ld)\n",
PTR_ERR(bridge));
ret = PTR_ERR(bridge);
goto error;
}
out->bridge = drm_bridge_get(bridge);
}
out->bridge = bridge;
if (local_bridge) {
if (!out->bridge) {
@ -65,11 +40,6 @@ int omapdss_device_init_output(struct omap_dss_device *out,
out->bridge = drm_bridge_get(local_bridge);
}
if (!out->bridge) {
ret = -EPROBE_DEFER;
goto error;
}
return 0;
error:
@ -79,10 +49,6 @@ int omapdss_device_init_output(struct omap_dss_device *out,
void omapdss_device_cleanup_output(struct omap_dss_device *out)
{
if (out->bridge && out->panel)
drm_panel_bridge_remove(out->next_bridge ?
out->next_bridge : out->bridge);
drm_bridge_put(out->next_bridge);
drm_bridge_put(out->bridge);
}