From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 8174226CE17 for ; Sat, 31 Jan 2026 15:26:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769873214; cv=none; b=r60FENIpGDih8a237fj16+UG2Vl7A0IPpWQbijjjlDvc/+OHokLxTeRyzzGhCfgcMoNqeCVZERRKKAggC64Yeiud16X+m1Adfq4E2PU5myET+uu1xS/i3KjnkNjIOCMpdIgNUn8jfoyZ9gDEI6kYYdgUSPHxHz9ETCMsoN8TI3I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769873214; c=relaxed/simple; bh=ME7pHoAEju0N5k3+ETPtM4gKEW2g2cPy/BmUFwMt/O8=; h=Mime-Version:Content-Type:Date:Message-Id:From:Subject:Cc:To: References:In-Reply-To; b=HonCNzfHXY61K8pQ+1geaXUK7qdTLsCYpanI/JBvRG5FQx5AgrKZgG72dL0q2frFAOFrB1wIOeRXQDniwbi/LEuDyHIzZ+hpcYiF5LNBL4D7kFb/OuvLQZ8vOQv2mPoMZpJ7rTE/Ce+iQXOHJ8afnimWAPctQ+R1SexAasnOYaw= 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=rhT4ppLl; arc=none smtp.client-ip=185.246.85.4 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="rhT4ppLl" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id D7E594E4235D; Sat, 31 Jan 2026 15:26:49 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 8D500606B6; Sat, 31 Jan 2026 15:26:49 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id EA38E119A888D; Sat, 31 Jan 2026 16:26:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1769873208; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=ME7pHoAEju0N5k3+ETPtM4gKEW2g2cPy/BmUFwMt/O8=; b=rhT4ppLlvuL1J9Kf8r7xznmQzhilwixZsftabPADKpgNziIFhRf5dGM24UjxSmrMSKB80S 8YZfm0bOiZ+WAiBncHrw5S5PDyTCunMm8DsxauDXmvQCE2lgoATY1zde9Q6bMo/+cGZulQ gzkgT8EPrtZIWuS84S2/BJVmT7Yp1FJLGto14iGUUi6gyYYCnOiKwN42g1BniGKCIeRxMz t1A2UL1ODeFngNaqd7MROKzZCO9j3K6UFvstH23Q/sj1n1zEZWp8FSz8wCuWQ8apz6rRL+ NVGFuiQ5GQu2+zs7jl+xs13nJqpRR7xQNKKdNo4R7X8IjsZ+4HwdocyoMKtNLA== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Sat, 31 Jan 2026 16:26:37 +0100 Message-Id: From: "Luca Ceresoli" Subject: Re: [PATCH 3/6] drm/mcde: dsi: warn in case of multiple subnodes Cc: "Biju Das" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "David Airlie" , "Simona Vetter" , "Anitha Chrisanthus" , "Edmund Dea" , "Laurent Pinchart" , "Tomi Valkeinen" , "Kieran Bingham" , "Geert Uytterhoeven" , "Magnus Damm" , "Tomi Valkeinen" , "Hui Pu" , "Ian Ray" , "Thomas Petazzoni" , , , To: "Linus Walleij" X-Mailer: aerc 0.20.1 References: <20260116-drm-bridge-alloc-getput-drm_of_find_bridge-4-v1-0-e34b38f50d27@bootlin.com> <20260116-drm-bridge-alloc-getput-drm_of_find_bridge-4-v1-3-e34b38f50d27@bootlin.com> In-Reply-To: X-Last-TLS-Session-Version: TLSv1.3 Hello Linus, On Mon Jan 19, 2026 at 9:54 AM CET, Linus Walleij wrote: > On Fri, Jan 16, 2026 at 6:33=E2=80=AFPM Luca Ceresoli wrote: > >> mcde_dsi_bind() has a loop over all subnodes looking for a panel, but do= es >> not exit when a match is found and only stores the last match. However t= his >> will be problematic when introducing refcounting on the struct drm_devic= e >> pointer in a following commit, because of_drm_find_and_get_bridge() woul= d >> 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. > > Go ahead and insert a break when the panel is found, there is > no MCDE-attached device with more than one panel. > > There *exist* the Samsung Gavini device which has a > LED panel, *and* the same lines attached to a mini-projector > so these two can be used at the same time. I have no idea > how to actually deal with that if someone one day want to > support it. Probably by putting the projector as a side thing > and not deal with the video stream in the device tree. Thanks for sharing these info! I'm very happy to know I can break instead of warning here. Change queued for v2. Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com