From nobody Tue Feb 10 04:08:02 2026 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 A83A23939BE for ; Fri, 16 Jan 2026 17:33:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768584807; cv=none; b=iK5LCybvOX+GkBQCmRhskIsEOyNEeTDQQV8XJrJyQxLVyz6NZfMGS2vqWoYzGi1uBkMYZO1gYMAjVeF0lPBq38p6/4gPLOdwwzYCEoO8/qtvbWMJCWXMuabtMROYdVa52nuKH71vy8GXpSqwd+Xm4pw6qyK+lMGE/0TT7o4bxFE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768584807; c=relaxed/simple; bh=22ZUyODgCQrkw0xGdlQfjJFi8n3l1aokaQjxeqDFD5k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=sXbcKazCOzl1rYQXHSYKrM2f36kn1+QAyf7BVGwjdaLuttQE9rMLE3D8NReHtWERRSnZCvSfIkGcEGsoBcaP+MywXnc9RsM2LYywEC+Sf8pHCpaqODe24AAhDve4ozw+97aDrykNfdQAFI59S9jVQ6fCU0zpdI+j9+ChwP9H8nU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=A9nNee/q; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="A9nNee/q" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 39F281A28A2; Fri, 16 Jan 2026 17:33:22 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 0EF58606F9; Fri, 16 Jan 2026 17:33:22 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 32EFE10B686C1; Fri, 16 Jan 2026 18:33:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1768584800; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=JT9tt5+vYn3tFfsnu8u8PU5Tm0hiFHW/bTFd3Um4N54=; b=A9nNee/qOpnUVD2WtdF3s+ntVaBnalIdxUrWhBAOVWYK8A9JkH8SGy9jJyEZISOfp/xNBi aJAgRnBAeiSypskHt48RCbtHRZ3LuYnwhXw2H0DlzgLIlXy1Vo5tiKNBrn9i1nTn6P5DK+ X6qPQpTn0cGxo1COQrpOoBPrmektQEQVyKjCYu2ruemb56iS9CNBIaPsfApeBkFR1e9lfx 3lbdZTh+aD+BE62caxX363CQD7SlnZ682uZP4EW7m/TLzDjXtmRGCcDh+6PlGYkC1x3Kd/ 3g97XosijAtgCfvN4PN0ZOmcOtNP6BcMiWuvr1P6dJQ9S/zeMgSPav0h6zvmLQ== From: Luca Ceresoli Date: Fri, 16 Jan 2026 18:32:38 +0100 Subject: [PATCH 3/6] drm/mcde: dsi: warn in case of multiple subnodes 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: <20260116-drm-bridge-alloc-getput-drm_of_find_bridge-4-v1-3-e34b38f50d27@bootlin.com> References: <20260116-drm-bridge-alloc-getput-drm_of_find_bridge-4-v1-0-e34b38f50d27@bootlin.com> In-Reply-To: <20260116-drm-bridge-alloc-getput-drm_of_find_bridge-4-v1-0-e34b38f50d27@bootlin.com> To: Biju Das , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Anitha Chrisanthus , Edmund Dea , Linus Walleij , Laurent Pinchart , Tomi Valkeinen , Kieran Bingham , Geert Uytterhoeven , Magnus Damm , Tomi Valkeinen Cc: Hui Pu , Ian Ray , Thomas Petazzoni , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Luca Ceresoli X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 mcde_dsi_bind() has a loop over all subnodes looking for a panel, but does not exit when a match is found and only stores the last match. However this will be problematic when introducing refcounting on the struct drm_device pointer in a following commit, because of_drm_find_and_get_bridge() would get a reference to multiple bridges. Assuming there is no real reason for looking for multiple panels, add a warning so it gets noticed in case the assumption is wrong. Signed-off-by: Luca Ceresoli --- I think the correct thing to do would be adding a break statement when there is a match. However I don't have knowledge of this driver and the hardware, thus this patch is a prudential alternative, not changing the behaviour. --- drivers/gpu/drm/mcde/mcde_dsi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/mcde/mcde_dsi.c b/drivers/gpu/drm/mcde/mcde_ds= i.c index a3423459dd7a..3faebe571fc2 100644 --- a/drivers/gpu/drm/mcde/mcde_dsi.c +++ b/drivers/gpu/drm/mcde/mcde_dsi.c @@ -1103,6 +1103,9 @@ static int mcde_dsi_bind(struct device *dev, struct d= evice *master, =20 /* Look for a panel as a child to this node */ for_each_available_child_of_node(dev->of_node, child) { + /* There should be only one panel subnode */ + WARN_ON(panel || bridge); + panel =3D of_drm_find_panel(child); if (IS_ERR(panel)) { dev_err(dev, "failed to find panel try bridge (%ld)\n", --=20 2.52.0