ALT Linux kernel packages development
 help / color / mirror / Atom feed
From: Daniil Gnusarev <gnusarevda@basealt.ru>
To: gnusarevda@basealt.ru, devel-kernel@lists.altlinux.org
Subject: [d-kernel] [PATCH 1/1] drm: rockchip: dwhdmiqp-rockchip: attach next bridge to the HDMI bridge
Date: Tue, 14 Jul 2026 10:15:02 +0400
Message-ID: <20260714061503.170801-2-gnusarevda@basealt.ru> (raw)
In-Reply-To: <20260714061503.170801-1-gnusarevda@basealt.ru>

For embedded systems, additional bridges may be connected after
the HDMI bridge being created. To ensure full functionality, they
must be added to the DRM bridge chain.

Signed-off-by: Daniil Gnusarev <gnusarevda@basealt.ru>
---
 .../gpu/drm/rockchip/dw_hdmi_qp-rockchip.c    | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
index 409f1a1e82a061..9485d85a16f35c 100644
--- a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
@@ -430,6 +430,8 @@ static int dw_hdmi_qp_rockchip_bind(struct device *dev, struct device *master,
 	struct drm_connector *connector;
 	struct drm_encoder *encoder;
 	struct rockchip_hdmi_qp *hdmi;
+	struct drm_bridge *hdmi_bridge;
+	struct drm_bridge *next_bridge;
 	struct resource *res;
 	struct clk_bulk_data *clks;
 	int ret, irq, i;
@@ -441,6 +443,11 @@ static int dw_hdmi_qp_rockchip_bind(struct device *dev, struct device *master,
 	if (!hdmi)
 		return -ENOMEM;
 
+	next_bridge = NULL;
+	ret = drm_of_find_panel_or_bridge(pdev->dev.of_node, 1, 0, NULL, &next_bridge);
+	if (ret && ret != -ENODEV)
+		return ret;
+
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	if (!res)
 		return -ENODEV;
@@ -556,6 +563,21 @@ static int dw_hdmi_qp_rockchip_bind(struct device *dev, struct device *master,
 		return ret;
 	}
 
+	if (next_bridge) {
+		hdmi_bridge = drm_bridge_chain_get_last_bridge(encoder);
+		if (hdmi_bridge)
+			ret = drm_bridge_attach(encoder, next_bridge, hdmi_bridge,
+						DRM_BRIDGE_ATTACH_NO_CONNECTOR);
+		else
+			ret = -ENODEV;
+		if (hdmi_bridge)
+			drm_bridge_put(hdmi_bridge);
+		if (ret) {
+			dev_err(hdmi->dev, "failed to attach next bridge: %d\n", ret);
+			return ret;
+		}
+	}
+
 	connector = drm_bridge_connector_init(drm, encoder);
 	if (IS_ERR(connector)) {
 		ret = PTR_ERR(connector);
-- 
2.42.2



  reply	other threads:[~2026-07-14  6:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14  6:15 [d-kernel] [PATCH 0/1] [6.18] drm: rockchip: attach next bridge Daniil Gnusarev
2026-07-14  6:15 ` Daniil Gnusarev [this message]
2026-07-15  8:45   ` [d-kernel] [PATCH 1/1] drm: rockchip: dwhdmiqp-rockchip: attach next bridge to the HDMI bridge Vasiliy Kovalev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260714061503.170801-2-gnusarevda@basealt.ru \
    --to=gnusarevda@basealt.ru \
    --cc=devel-kernel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux kernel packages development

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel-kernel/0 devel-kernel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel-kernel devel-kernel/ http://lore.altlinux.org/devel-kernel \
		devel-kernel@altlinux.org devel-kernel@altlinux.ru devel-kernel@altlinux.com
	public-inbox-index devel-kernel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git