From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 B8E823E4C96; Thu, 24 Sep 2026 07:01:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790233319; cv=none; b=ChRpajS33GzWfPU+92eQims104ibRpEKCw1TMowL2OzOq9Bo+nCmgD6NXiaH//ucXWPdZJ44cfhCgY/PjfgcB0RKdiMhwGq7pbguLkCMXH0qC5CtUrO1ZIm/QYN8iQh9YqV+d50zO0yfR2RCHbms6nhMVAhqayhvMvHPm5dSNfo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790233319; c=relaxed/simple; bh=21vHPs+cccmI0GIDrI9wBRtngdr4EBlpl0EvM5Z31P0=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:To:From:Subject: References:In-Reply-To; b=fizDNc3pNoHXrAPDf0Kzv/ke+PFF16UeAjwB+6VZwWlGf7efM7kPL+WROqRzXc31wnwanfybbH4osmEPu5gxJg2MW18ez6Ex1ia1cnGjtXgbUE18PFMd/HwZIN4PAPQu+k4kNPkgzYxo9jKv0neeYYSPR1hSSAsM2vEkd2oRjb0= 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=VfDv7S7f; arc=none smtp.client-ip=185.171.202.116 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="VfDv7S7f" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 58E1FC211CF; Thu, 24 Sep 2026 07:02:31 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id EA2AA5FB45; Thu, 24 Sep 2026 07:01:43 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id B2EEF103294A6; Thu, 24 Sep 2026 09:01:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1790233298; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=3oGwBuyJVzkAjrauN/FxJTxwMCY3sLnXn9ixXjUrD2A=; b=VfDv7S7faDApBOx+DPqMCyWHBKUPlODcB1xuNfsFjM3RNlzyRMcdJhIP0bigttbKx1o5jy +B3mEF8B/s9ysd2wfnmGpCg4NZheR3VGvS94Ic0SKnLPviSK0O4PMC4viKTqfmdCj+9vMX uaR7ncMHlkENvjrtg1sfppR2+2rB1w3yNHl15P3vTuCFyK7Bv7Ut1MV2dfvSol7696XXmK vqgt//ttjMMGzJqmyWKqUW/+naiLm3TqTzPFnvGHAOfowEfbjOv664AYGg+P4m03YFGXZS W/ZrKJoYs3u+wZqS+nmUIHWaVMRI8biPPQkNoSk2GzQUV+7Bbe8V7J315PgOJg== 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: Thu, 24 Sep 2026 09:01:18 +0200 Message-Id: Cc: "Andrzej Hajda" , "Neil Armstrong" , "Robert Foss" , "Laurent Pinchart" , "Jonas Karlman" , "Jernej Skrabec" , "Maarten Lankhorst" , "Thomas Zimmermann" , "David Airlie" , "Simona Vetter" , "Jessica Zhang" , "Laurentiu Palcu" , "Lucas Stach" , "Frank Li" , "Sascha Hauer" , "Pengutronix Kernel Team" , "Fabio Estevam" , "Paul Cercueil" , "Paul Kocialkowski" , "Linus Walleij" , "Inki Dae" , "Jagan Teki" , "Marek Szyprowski" , "Sean Paul" , "Jonathan Corbet" , "Shuah Khan" , "Randy Dunlap" , "Albert Esteve" , "Anusha Srivatsa" , "Dmitry Baryshkov" , "Hui Pu" , "Ian Ray" , "Thomas Petazzoni" , , , , , , , , , , , , , To: "Maxime Ripard" , "Luca Ceresoli" From: "Luca Ceresoli" Subject: Re: [PATCH v3 12/19] drm/mcde: dsi: don't create a panel_bridge X-Mailer: aerc 0.22.0 References: <20260916-drm-bridge-every-panel-v3-0-83afb4f1a707@bootlin.com> <20260916-drm-bridge-every-panel-v3-12-83afb4f1a707@bootlin.com> In-Reply-To: X-Last-TLS-Session-Version: TLSv1.3 Hi Linus, Maxime, On Tue Sep 22, 2026 at 9:09 AM CEST, Maxime Ripard wrote: > On Wed, Sep 16, 2026 at 03:45:36PM +0200, Luca Ceresoli wrote: >> Now a panel_bridge is automatically created for every drm_panel and the >> panel-bridge API is just a deprecated wrapper to access it. >> >> Update and simplify the code by just getting a reference to the >> already-existing bridge using of_drm_find_and_get_bridge(). >> >> Also keep the "connected to non-panel bridge (unsupported)\n" error logi= c >> by using the drm_bridge_is_panel() function. >> >> Signed-off-by: Luca Ceresoli [...] >> @@ -1102,40 +1100,21 @@ static int mcde_dsi_bind(struct device *dev, str= uct device *master, >> >> /* Look for a panel as a child to this node */ >> for_each_available_child_of_node_scoped(dev->of_node, child) { >> - panel =3D of_drm_find_panel(child); >> - if (IS_ERR(panel)) { >> - dev_err(dev, "failed to find panel try bridge (%ld)\n", >> - PTR_ERR(panel)); >> - panel =3D NULL; >> - >> - bridge =3D of_drm_find_and_get_bridge(child); >> - if (!bridge) { >> - dev_err(dev, "failed to find bridge\n"); >> - return -EINVAL; >> - } >> + bridge =3D of_drm_find_and_get_bridge(child); >> + if (!bridge) { >> + dev_err(dev, "failed to find bridge\n"); >> + return -EINVAL; >> } >> >> - if (panel || bridge) >> - break; >> + break; >> } >> - if (panel) { >> - bridge =3D drm_panel_bridge_add_typed(panel, >> - DRM_MODE_CONNECTOR_DSI); >> - drm_panel_put(panel); >> - if (IS_ERR(bridge)) { >> - dev_err(dev, "error adding panel bridge\n"); >> - return PTR_ERR(bridge); >> - } >> - drm_bridge_get(bridge); >> - dev_info(dev, "connected to panel\n"); >> - d->panel =3D panel; >> - } else if (bridge) { >> + if (!bridge) { >> + dev_err(dev, "no bridge\n"); >> + return -ENODEV; >> + } else if (!drm_bridge_is_panel(bridge)) { >> /* TODO: AV8100 HDMI encoder goes here for example */ >> dev_info(dev, "connected to non-panel bridge (unsupported)\n"); >> return -ENODEV; > > I wonder if we still need that branch. Every panel is a bridge now, and > it looks like we don't have any specific panel handling in this driver, > so I guess it supports bridges already? > > Linus, do you know why this condition was here in the first place? I had the same thought while writing the patch, but I chose to be conservative. Linus, unless you have more info I'm going to apply the patch as is. Removing this special case would be welcome as a later patch. Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com