From nobody Sun Oct 5 18:19:56 2025 Received: from srv01.abscue.de (abscue.de [89.58.28.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DBFEB1ACED9; Thu, 31 Jul 2025 15:53:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.58.28.240 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753977188; cv=none; b=k8ArK04bWOiPQI6AvEyWhiVBWKR0wIabVVAR0jKlESZSagZelluRvpBJM6Tb0z3YcNd0MXePbCaiF4kqgKWHQddp1zRkCxfMmql9QRXQ3jvU0KLGmuMI9s2XLicqNxu/HlGKvhad98/P0AxbUeDgqIbG0o/TGGZPPwlmanGX43o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753977188; c=relaxed/simple; bh=/hDMFfib2TZPG22mAzqNwRHidGMVAxYzgUZyc2zrlkw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BbMpuM8oQ1aZCKjr2q+WzkG4iWh9fzrhA2HgTX7InMnWXVm6qbfKVCRowF4sMXgMg45QmfWocG/b6HCGh99DgvvwcbSU/iGYLCd46A5CoBw29Z0bKXxko1pc6jWq17/14tCkdIDKDs53v4mUcjlJAdezaiL7JqlJ2OXlVWdRio8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=abscue.de; spf=pass smtp.mailfrom=abscue.de; arc=none smtp.client-ip=89.58.28.240 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=abscue.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=abscue.de Received: from srv01.abscue.de (localhost [127.0.0.1]) by spamfilter.srv.local (Postfix) with ESMTP id 437FA1C2710; Thu, 31 Jul 2025 17:52:56 +0200 (CEST) X-Spam-Level: Received: from fluffy-mammal.metal.fwg-cag.de (unknown [IPv6:2001:9e8:cdc9:0:1347:874c:9851:58c6]) by srv01.abscue.de (Postfix) with ESMTPSA id 9E6131C2713; Thu, 31 Jul 2025 17:52:53 +0200 (CEST) From: =?utf-8?q?Otto_Pfl=C3=BCger?= Date: Thu, 31 Jul 2025 17:51:18 +0200 Subject: [PATCH v3 05/16] drm: of: try binding port parent node instead of the port itself Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250731-ums9230-drm-v3-5-06d4f57c4b08@abscue.de> References: <20250731-ums9230-drm-v3-0-06d4f57c4b08@abscue.de> In-Reply-To: <20250731-ums9230-drm-v3-0-06d4f57c4b08@abscue.de> To: David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Orson Zhai , Baolin Wang , Chunyan Zhang , Kevin Tang , Liviu Dudau , Russell King , Eric Anholt , Kevin Tang Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Otto_Pfl=C3=BCger?= X-Mailer: b4 0.14.2 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. Fixes: df785aa87f3a ("drm: Introduce generic probe function for component b= ased masters.") Signed-off-by: Otto Pfl=C3=BCger --- 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..b972facc2ec3fe40a4e10b5d717= 8b5ac8c0158d5 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, =20 if (of_device_is_available(port->parent)) drm_of_component_match_add(dev, &match, compare_of, - port); + port->parent); =20 of_node_put(port); } --=20 2.50.0