From mboxrd@z Thu Jan 1 00:00:00 1970 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 94122511E97 for ; Wed, 16 Sep 2026 13:48:09 +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=1789566494; cv=none; b=qrH8r48USRa5lnhYuZv2YcRlTbS7XV6N2MBPu2sDHqdQpXiPG8nZIoyDWhHWl4UJGHXowzv5EU1OaBDJjHL4v3zv6fOTZNPsJ4Ja3qxVZsc8X4+2zYwcWN3geRZUro2P4xiI8ahnWHs9D/+ODpdp+Bciwfl0pvvsn4QnvaaCPnc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789566494; c=relaxed/simple; bh=zvmvQCvpPudl4NcpR0ZTDrhuH1AzDUe4QC/1i8pfGSE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ddm/n578jxWF80jdT4G7dn8n4wbw1Tqp5v7h5LfiZoNGKirkANlVL+SRWoy/rCBOzDuKNNP85CfjCCFLaHUUzuwFc5Ee1YOQJSxyULZ4f34iLjd2QUsLWaZYxTK4a8mz6DbdTJclp0+/khlmJHRiqLBJpNgvoCoVRGIDvW3CrIo= 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=QGALR/4F; 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="QGALR/4F" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id EB31A1A07A8; Wed, 16 Sep 2026 13:48:06 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id B9F0660337; Wed, 16 Sep 2026 13:48:06 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 8B57111C7B031; Wed, 16 Sep 2026 15:47:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1789566480; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=WuZX7Ld13ojOYCTY0ar+bokEZLNX0F8BwuavdUHGtR8=; b=QGALR/4FPgZgsJZy9ShvO3e3wFndnrRlRApyWADH7o1KovktZ6gvPgK5F3GcNw7Xi4G2vp jDl32gEpAtULcO8jsBkGW+p7uDlw04AuoovRFl1g/lx8/75D5MKKLRDH7kwUVFAKp6ithU HsjCJjTIVNmRSKBUP6bM2vX7HQXd/kqGyPzL6AO4iI+iB8TusNMlHxNFUkb36uwwAwc8uN SCVmLoMR/scL/Jz4EBOAuzAQD02IYoVrIYq1MNN03qOCft36nfQHBx5Wm8NopxtVSHKIC0 +7q6jNwndNZrUZpcLnB+S5CsGCAtKzdXd2tLF5blJtYK8fz7pJolZTed0/UZHQ== From: Luca Ceresoli Date: Wed, 16 Sep 2026 15:45:41 +0200 Subject: [PATCH v3 17/19] drm/omap: dss: don't create a panel_bridge 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: 7bit Message-Id: <20260916-drm-bridge-every-panel-v3-17-83afb4f1a707@bootlin.com> References: <20260916-drm-bridge-every-panel-v3-0-83afb4f1a707@bootlin.com> In-Reply-To: <20260916-drm-bridge-every-panel-v3-0-83afb4f1a707@bootlin.com> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , 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 Cc: Albert Esteve , Anusha Srivatsa , Dmitry Baryshkov , Hui Pu , Ian Ray , Thomas Petazzoni , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, asahi@lists.linux.dev, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-doc@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Luca Ceresoli X-Mailer: b4 0.16.0 X-Last-TLS-Session-Version: TLSv1.3 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_get_bridge_by_endpoint(). Signed-off-by: Luca Ceresoli --- drivers/gpu/drm/omapdrm/dss/omapdss.h | 1 - drivers/gpu/drm/omapdrm/dss/output.c | 42 ++++------------------------------- 2 files changed, 4 insertions(+), 39 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h index 4c22c09c93d5..e3e685c931f1 100644 --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h @@ -204,7 +204,6 @@ struct omap_dss_device { struct dss_device *dss; struct drm_bridge *bridge; struct drm_bridge *next_bridge; - struct drm_panel *panel; struct list_head list; diff --git a/drivers/gpu/drm/omapdrm/dss/output.c b/drivers/gpu/drm/omapdrm/dss/output.c index 6e9bc605ee22..36d37deac802 100644 --- a/drivers/gpu/drm/omapdrm/dss/output.c +++ b/drivers/gpu/drm/omapdrm/dss/output.c @@ -12,7 +12,6 @@ #include #include -#include #include "dss.h" #include "omapdss.h" @@ -20,40 +19,16 @@ int omapdss_device_init_output(struct omap_dss_device *out, struct drm_bridge *local_bridge) { - struct device_node *remote_node; + struct drm_bridge *bridge; int ret; - remote_node = of_graph_get_remote_node(out->dev->of_node, - out->of_port, 0); - if (!remote_node) { + bridge = of_drm_get_bridge_by_endpoint(out->dev->of_node, out->of_port, 0); + if (IS_ERR(bridge)) { dev_dbg(out->dev, "failed to find video sink\n"); return 0; } - out->panel = of_drm_find_panel(remote_node); - if (IS_ERR(out->panel)) - out->panel = NULL; - - if (!out->panel) - out->bridge = of_drm_find_and_get_bridge(remote_node); - - of_node_put(remote_node); - - if (out->panel) { - struct drm_bridge *bridge; - - bridge = drm_panel_bridge_add(out->panel); - drm_panel_put(out->panel); - if (IS_ERR(bridge)) { - dev_err(out->dev, - "unable to create panel bridge (%ld)\n", - PTR_ERR(bridge)); - ret = PTR_ERR(bridge); - goto error; - } - - out->bridge = drm_bridge_get(bridge); - } + out->bridge = bridge; if (local_bridge) { if (!out->bridge) { @@ -65,11 +40,6 @@ int omapdss_device_init_output(struct omap_dss_device *out, out->bridge = drm_bridge_get(local_bridge); } - if (!out->bridge) { - ret = -EPROBE_DEFER; - goto error; - } - return 0; error: @@ -79,10 +49,6 @@ int omapdss_device_init_output(struct omap_dss_device *out, void omapdss_device_cleanup_output(struct omap_dss_device *out) { - if (out->bridge && out->panel) - drm_panel_bridge_remove(out->next_bridge ? - out->next_bridge : out->bridge); - drm_bridge_put(out->next_bridge); drm_bridge_put(out->bridge); } -- 2.55.0