mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Otto Pflüger" <otto.pflueger@abscue.de>
To: David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	 Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	 Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	 Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	Orson Zhai <orsonzhai@gmail.com>,
	 Baolin Wang <baolin.wang@linux.alibaba.com>,
	 Chunyan Zhang <zhang.lyra@gmail.com>,
	Kevin Tang <kevin.tang@unisoc.com>
Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"Otto Pflüger" <otto.pflueger@abscue.de>
Subject: [PATCH 03/12] drm: of: try binding port parent node instead of the port itself
Date: Sat, 19 Jul 2025 14:09:39 +0200	[thread overview]
Message-ID: <20250719-ums9230-drm-v1-3-e4344a05eb3d@abscue.de> (raw)
In-Reply-To: <20250719-ums9230-drm-v1-0-e4344a05eb3d@abscue.de>

The drm_of_component_probe function is intended to bind all devices in
an OF graph given a set of ports linked using the "ports" property on a
main device node. This means that it should also bind the components
providing these ports, not just the components of other ports connected
to them. In order to do this, it calls drm_of_component_match_add with
a pointer to each port node after checking that its parent node is a
device.

However, when given a pointer to the port node, the compare_of callback
does not match it with a device node and thus fails to detect that the
node belongs to a component. Fix this by passing a pointer to the parent
node here too.

Currently only the Unisoc platform driver relies on this feature, which
was previously broken and is fixed by this change. On other platforms,
the "ports" property points to ports that are not part of a component,
i.e. the components only have indirect connections to the main node.

Signed-off-by: Otto Pflüger <otto.pflueger@abscue.de>
---
 drivers/gpu/drm/drm_of.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c
index d0183dea770308e77f05da364ffe087d53f3be36..b972facc2ec3fe40a4e10b5d7178b5ac8c0158d5 100644
--- a/drivers/gpu/drm/drm_of.c
+++ b/drivers/gpu/drm/drm_of.c
@@ -132,7 +132,7 @@ int drm_of_component_probe(struct device *dev,
 
 		if (of_device_is_available(port->parent))
 			drm_of_component_match_add(dev, &match, compare_of,
-						   port);
+						   port->parent);
 
 		of_node_put(port);
 	}

-- 
2.50.0

  parent reply	other threads:[~2025-07-19 12:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-19 12:09 [PATCH 00/12] drm: sprd: Make the Unisoc DRM driver usable on UMS9230 Otto Pflüger
2025-07-19 12:09 ` [PATCH 01/12] dt-bindings: display: sprd: adapt for UMS9230 support Otto Pflüger
2025-07-19 13:24   ` Rob Herring (Arm)
2025-07-20 12:26   ` Krzysztof Kozlowski
2025-07-20 13:55     ` Otto Pflüger
2025-07-20 15:38       ` Krzysztof Kozlowski
2025-07-20 17:35         ` Otto Pflüger
2025-07-22  7:19           ` Krzysztof Kozlowski
2025-07-19 12:09 ` [PATCH 02/12] dt-bindings: display: sprd: allow attaching a DSI panel Otto Pflüger
2025-07-19 12:09 ` Otto Pflüger [this message]
2025-07-28 15:41   ` [PATCH 03/12] drm: of: try binding port parent node instead of the port itself Dmitry Baryshkov
2025-07-19 12:09 ` [PATCH 04/12] drm: sprd: remove plane and crtc destroy callbacks Otto Pflüger
2025-07-28 15:41   ` Dmitry Baryshkov
2025-07-19 12:09 ` [PATCH 05/12] drm: sprd: register a DSI bridge and move init code to pre_enable Otto Pflüger
2025-07-28 15:43   ` Dmitry Baryshkov
2025-07-19 12:09 ` [PATCH 06/12] drm: sprd: add support for UMS9230 DSI PLL Otto Pflüger
2025-07-19 12:09 ` [PATCH 07/12] drm: sprd: fix DSI rate and PLL setup code Otto Pflüger
2025-07-19 12:09 ` [PATCH 08/12] drm: sprd: add gate clock support Otto Pflüger
2025-07-19 12:09 ` [PATCH 09/12] drm: sprd: add support for newer DPU versions Otto Pflüger
2025-07-19 12:09 ` [PATCH 10/12] drm: sprd: always initialize DPU and DSI registers Otto Pflüger
2025-07-19 12:09 ` [PATCH 11/12] drm: sprd: add fbdev support Otto Pflüger
2025-07-19 12:09 ` [PATCH 12/12] drm: sprd: select REGMAP in Kconfig Otto Pflüger

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=20250719-ums9230-drm-v1-3-e4344a05eb3d@abscue.de \
    --to=otto.pflueger@abscue.de \
    --cc=airlied@gmail.com \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kevin.tang@unisoc.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=orsonzhai@gmail.com \
    --cc=robh@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    --cc=zhang.lyra@gmail.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®