summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorLuca Ceresoli <luca.ceresoli@bootlin.com>2026-01-09 11:02:53 +0100
committerLuca Ceresoli <luca.ceresoli@bootlin.com>2026-01-21 13:59:56 +0100
commit4ace6fbcd25f5ef275c91b93424e715f96197e50 (patch)
tree4a34d371256b9b7b4e64137c7554b354e210976d /drivers/gpu
parent6dfebeee296cbb3296f06c28f3b2d053ec8374e7 (diff)
drm/mediatek: mtk_hdmi*: convert to of_drm_find_and_get_bridge()
of_drm_find_bridge() is deprecated. Move to its replacement of_drm_find_and_get_bridge() which gets a bridge reference, and ensure it is put when done by using the drm_bridge::next_bridge pointer. Acked-by: Maxime Ripard <mripard@kernel.org> Link: https://patch.msgid.link/20260109-drm-bridge-alloc-getput-drm_of_find_bridge-3-v2-4-8d7a3dbacdf4@bootlin.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/mediatek/mtk_hdmi.c4
-rw-r--r--drivers/gpu/drm/mediatek/mtk_hdmi_common.c4
-rw-r--r--drivers/gpu/drm/mediatek/mtk_hdmi_common.h1
-rw-r--r--drivers/gpu/drm/mediatek/mtk_hdmi_v2.c4
4 files changed, 6 insertions, 7 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c
index 0face4dcaa36..1ea259854780 100644
--- a/drivers/gpu/drm/mediatek/mtk_hdmi.c
+++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c
@@ -986,8 +986,8 @@ static int mtk_hdmi_bridge_attach(struct drm_bridge *bridge,
return -EINVAL;
}
- if (hdmi->next_bridge) {
- ret = drm_bridge_attach(encoder, hdmi->next_bridge,
+ if (hdmi->bridge.next_bridge) {
+ ret = drm_bridge_attach(encoder, hdmi->bridge.next_bridge,
bridge, flags);
if (ret)
return ret;
diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_common.c b/drivers/gpu/drm/mediatek/mtk_hdmi_common.c
index c599ba767093..f32862bbe220 100644
--- a/drivers/gpu/drm/mediatek/mtk_hdmi_common.c
+++ b/drivers/gpu/drm/mediatek/mtk_hdmi_common.c
@@ -315,8 +315,8 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi, struct platform_device
return -EINVAL;
if (!of_device_is_compatible(remote, "hdmi-connector")) {
- hdmi->next_bridge = of_drm_find_bridge(remote);
- if (!hdmi->next_bridge) {
+ hdmi->bridge.next_bridge = of_drm_find_and_get_bridge(remote);
+ if (!hdmi->bridge.next_bridge) {
dev_err(dev, "Waiting for external bridge\n");
of_node_put(remote);
return -EPROBE_DEFER;
diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_common.h b/drivers/gpu/drm/mediatek/mtk_hdmi_common.h
index de5e064585f8..cace3c5dc067 100644
--- a/drivers/gpu/drm/mediatek/mtk_hdmi_common.h
+++ b/drivers/gpu/drm/mediatek/mtk_hdmi_common.h
@@ -150,7 +150,6 @@ struct mtk_hdmi_conf {
struct mtk_hdmi {
struct drm_bridge bridge;
- struct drm_bridge *next_bridge;
struct drm_connector *curr_conn;/* current connector (only valid when 'enabled') */
struct device *dev;
const struct mtk_hdmi_conf *conf;
diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_v2.c b/drivers/gpu/drm/mediatek/mtk_hdmi_v2.c
index d0e4440b7491..5143d8a3b4f2 100644
--- a/drivers/gpu/drm/mediatek/mtk_hdmi_v2.c
+++ b/drivers/gpu/drm/mediatek/mtk_hdmi_v2.c
@@ -960,8 +960,8 @@ static int mtk_hdmi_v2_bridge_attach(struct drm_bridge *bridge,
DRM_ERROR("The flag DRM_BRIDGE_ATTACH_NO_CONNECTOR must be supplied\n");
return -EINVAL;
}
- if (hdmi->next_bridge) {
- ret = drm_bridge_attach(encoder, hdmi->next_bridge, bridge, flags);
+ if (hdmi->bridge.next_bridge) {
+ ret = drm_bridge_attach(encoder, hdmi->bridge.next_bridge, bridge, flags);
if (ret)
return ret;
}