From: "Luca Ceresoli" <luca.ceresoli@bootlin.com>
To: "Dmitry Baryshkov" <dmitry.baryshkov@oss.qualcomm.com>,
"Douglas Anderson" <dianders@chromium.org>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Jessica Zhang" <jesszhan0024@gmail.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Jyri Sarha" <jyri.sarha@iki.fi>,
"Tomi Valkeinen" <tomi.valkeinen@ideasonboard.com>,
"Andrzej Hajda" <andrzej.hajda@intel.com>,
"Robert Foss" <rfoss@kernel.org>,
"Laurent Pinchart" <Laurent.pinchart@ideasonboard.com>,
"Jonas Karlman" <jonas@kwiboo.se>,
"Jernej Skrabec" <jernej.skrabec@gmail.com>,
"Luca Ceresoli" <luca.ceresoli@bootlin.com>,
"Paul Cercueil" <paul@crapouillou.net>,
"Marek Vasut" <marex@denx.de>, "Stefan Agner" <stefan@agner.ch>,
"Frank Li" <Frank.Li@nxp.com>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Fabio Estevam" <festevam@gmail.com>,
"Laurent Pinchart" <laurent.pinchart+renesas@ideasonboard.com>,
"Tomi Valkeinen" <tomi.valkeinen+renesas@ideasonboard.com>,
"Kieran Bingham" <kieran.bingham+renesas@ideasonboard.com>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Magnus Damm" <magnus.damm@gmail.com>,
"Biju Das" <biju.das.jz@bp.renesas.com>,
"Linus Walleij" <linusw@kernel.org>,
"Sandy Huang" <hjc@rock-chips.com>,
"Heiko Stübner" <heiko@sntech.de>,
"Andy Yan" <andy.yan@rock-chips.com>,
"Jonathan Corbet" <corbet@lwn.net>,
"Shuah Khan" <skhan@linuxfoundation.org>,
"Randy Dunlap" <rdunlap@infradead.org>,
"Inki Dae" <inki.dae@samsung.com>,
"Seung-Woo Kim" <sw0312.kim@samsung.com>,
"Kyungmin Park" <kyungmin.park@samsung.com>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"Peter Griffin" <peter.griffin@linaro.org>,
"Alim Akhtar" <alim.akhtar@samsung.com>,
"Alison Wang" <alison.wang@nxp.com>,
"Paul Kocialkowski" <paulk@sys-base.io>,
"Yannick Fertre" <yannick.fertre@foss.st.com>,
"Raphael Gallais-Pou" <raphael.gallais-pou@foss.st.com>,
"Philippe Cornu" <philippe.cornu@foss.st.com>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
"Chen-Yu Tsai" <wens@kernel.org>,
"Samuel Holland" <samuel@sholland.org>,
"Thierry Reding" <thierry.reding@kernel.org>,
"Mikko Perttunen" <mperttunen@nvidia.com>,
"Jonathan Hunter" <jonathanh@nvidia.com>,
"Jagan Teki" <jagan@amarulasolutions.com>,
"Ondrej Jirman" <megi@xff.cz>,
"Javier Martinez Canillas" <javierm@redhat.com>,
"Igor Reznichenko" <igor@reznichenko.net>,
"Michael Walle" <mwalle@kernel.org>,
"Dario Binacchi" <dario.binacchi@amarulasolutions.com>,
"Jagan Teki" <jagan@edgeble.ai>,
"Jianhua Lu" <lujianhua000@gmail.com>,
"Guido Günther" <agx@sigxcpu.org>,
"Purism Kernel Team" <kernel@puri.sm>,
"Jerry Han" <hanxu5@huaqin.corp-partner.google.com>,
"Joel Selvaraj" <jo@jsfamily.in>,
"Icenowy Zheng" <icenowy@aosc.io>,
"Michael Trimarchi" <michael@amarulasolutions.com>,
"Sumit Semwal" <sumit.semwal@linaro.org>,
"Casey Connolly" <casey.connolly@linaro.org>,
"Michael Tretter" <m.tretter@pengutronix.de>,
"Cristian Cozzolino" <cristian_ci@protonmail.com>,
"Junjie Cao" <junjie.cao@linux.dev>,
"Ryan Brue" <ryanbrue.dev@gmail.com>,
"Nickolay Goppen" <setotau@mainlining.org>,
"Stefan Mavrodiev" <stefan@olimex.com>,
"Florian Fainelli" <florian.fainelli@broadcom.com>,
"Broadcom internal kernel review list"
<bcm-kernel-feedback-list@broadcom.com>,
"Robert Chiras" <robert.chiras@nxp.com>,
"Alexander Koskovich" <akoskovich@pm.me>,
"Markuss Broks" <markuss.broks@gmail.com>,
"Artur Weber" <aweber.kernel@gmail.com>,
"David Heidelberg" <david@ixit.cz>,
"Dzmitry Sankouski" <dsankouski@gmail.com>,
"Yedaya Katsman" <yedaya.ka@gmail.com>
Cc: <dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
<linux-mips@vger.kernel.org>, <imx@lists.linux.dev>,
<linux-arm-kernel@lists.infradead.org>,
<linux-renesas-soc@vger.kernel.org>,
<linux-rockchip@lists.infradead.org>, <linux-doc@vger.kernel.org>,
<linux-samsung-soc@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-sunxi@lists.linux.dev>, <linux-tegra@vger.kernel.org>,
<linux-rpi-kernel@lists.infradead.org>
Subject: Re: [PATCH 00/35] drm/panel: let the panels use the atomic state
Date: Fri, 30 Oct 2026 18:31:02 +0100 [thread overview]
Message-ID: <DMICO60J4G03.1QBH2T9SQ7XEZ@bootlin.com> (raw)
In-Reply-To: <cxsgo7u2hfb4jskscqcbeaaneiyfh7bdmlvku2wxwtduekwhxz@3vsizgxvekw7>
Hi Dmitry,
On Tue Oct 27, 2026 at 1:02 PM CET, Dmitry Baryshkov wrote:
> On Mon, Oct 26, 2026 at 01:09:49PM +0200, Dmitry Baryshkov wrote:
>> The panel is the only element of the display pipeline which never sees
>> the atomic commit. Its prepare() and enable() callbacks get nothing but
>> the panel, so a panel which has to be programmed differently depending
>> on the mode can only guess it. The NT35950 driver, for example, saves
>> the connector in get_modes() and reads connector->state->crtc->state
>> while being prepared: without the locks, from the current state rather
>> than from the one being committed, and with no way to reject a mode it
>> doesn't know.
>>
>> Every panel has a struct drm_bridge embedded into it, and the bridge
>> already has all the missing parts: atomic_check(), a state object which
>> can be subclassed and the commit passed to the callbacks. Rather than
>> growing struct drm_panel_funcs into a copy of that, let the panel driver
>> provide struct drm_bridge_funcs for the embedded bridge. This is opt-in:
>> the panels which have no use for the atomic state keep using struct
>> drm_panel_funcs and are not touched by it.
>>
>> To get there the bridge callbacks become the entry point to the panel,
>> with drm_panel_prepare() and friends calling them rather than the other
>> way around. The panel core still has to track the panel state, notify
>> the panel followers and handle the backlight, so the driver doesn't fill
>> in the power callbacks directly, it wraps its functions with the macros
>> doing that part. NT35950 is converted as the first user.
>>
>> The bulk of the series is the cleanup of what the panel core and the
>> bridge need from the panel driver, so that a panel providing the bridge
>> callbacks doesn't need struct drm_panel_funcs for anything:
>>
>> - get_timings() had no callers.
>>
>> - The connector type was stored both in the panel and in its bridge, and
>> the display drivers could override it while creating the panel bridge.
>>
>> - The orientation was read from the DT, stored and returned by nearly
>> identical code in more than twenty panel drivers, and some of them
>> also had to set it on the connector from get_modes(), with a TODO
>> asking for a better place. The core reads it now. It is applied to the
>> connector from the new connector_init() bridge callback, which is not
>> specific to the panels: other bridges have properties to set up on the
>> connector being created too (HDCP, DP link properties), and currently
>> have nowhere to do it.
>>
>> - disable() and unprepare() returned an error which nobody could act on.
>> Worse, a failed unprepare() left the panel marked as prepared, so it
>> was never initialised again.
>>
>> Behaviour changes worth knowing about:
>>
>> - Panels with the rotation property whose driver ignored it now get the
>> orientation property. In the tree this is the Motorola Mapphone panel
>> (panel-dsi-cm).
>>
>> - sun6i_mipi_dsi, sti_dvo and the Tegra DSI get their panel after the
>> DRM device has been registered, which is too late to create the
>> property, so they lose the orientation which the panel drivers used to
>> set from get_modes(). None of the rotated panels in the tree are used
>> with them.
>>
>> - A panel implementing atomic_check() can only be driven through the
>> bridge chain. The display drivers calling drm_panel_prepare() directly
>> have no commit to pass.
>>
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>> ---
>> Dmitry Baryshkov (35):
>> drm/panel: remove the get_timings() callback
>> drm/panel: remove the unused struct panel_bridge
>> drm/tidss: get the panel type from the embedded bridge
>> drm/bridge: lvds-codec: use devm_drm_panel_bridge_add()
>> drm/ingenic: use devm_drm_panel_bridge_add()
>> drm: mxsfb: use devm_drm_panel_bridge_add()
>> drm: rcar-du: use devm_drm_panel_bridge_add()
>> drm: rz-du: use devm_drm_panel_bridge_add()
>> drm/mcde: use drm_panel_bridge_add()
>> drm/pl111: use drm_panel_bridge_add()
>> drm/rockchip: lvds: use drm_panel_bridge_add()
>> drm/rockchip: rgb: use drm_panel_bridge_add()
>> drm/panel: remove the _typed() panel bridge functions
>
> Gmail barked at me for sending too many emails for too many recipients
> in the middle of the series. I guess, I'll have to split the series into
> smaller parts. Please consider reviewing the posted patches, letting me
> split / land the series in parts.
The first 13~14 patches are nice and fairly independent cleanups. I guess
they can be sent separately, or just be applied. However I'd still want to
review patch 14 and do some testing next week before I consider them ready
for applying.
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2026-10-30 17:31 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 11:09 Dmitry Baryshkov
2026-10-26 11:09 ` [PATCH 01/35] drm/panel: remove the get_timings() callback Dmitry Baryshkov
2026-10-30 17:28 ` Luca Ceresoli
2026-10-26 11:09 ` [PATCH 02/35] drm/panel: remove the unused struct panel_bridge Dmitry Baryshkov
2026-10-30 17:28 ` Luca Ceresoli
2026-10-26 11:09 ` [PATCH 03/35] drm/tidss: get the panel type from the embedded bridge Dmitry Baryshkov
2026-10-30 17:28 ` Luca Ceresoli
2026-10-26 11:09 ` [PATCH 04/35] drm/bridge: lvds-codec: use devm_drm_panel_bridge_add() Dmitry Baryshkov
2026-10-30 17:28 ` Luca Ceresoli
2026-10-26 11:09 ` [PATCH 05/35] drm/ingenic: " Dmitry Baryshkov
2026-10-27 17:50 ` Paul Cercueil
2026-10-30 17:28 ` Luca Ceresoli
2026-10-26 11:09 ` [PATCH 06/35] drm: mxsfb: " Dmitry Baryshkov
2026-10-28 7:51 ` Laurentiu Palcu
2026-10-30 17:28 ` Luca Ceresoli
2026-10-26 11:09 ` [PATCH 07/35] drm: rcar-du: " Dmitry Baryshkov
2026-10-30 17:28 ` Luca Ceresoli
2026-10-26 11:09 ` [PATCH 08/35] drm: rz-du: " Dmitry Baryshkov
2026-10-30 17:28 ` Luca Ceresoli
2026-10-26 11:09 ` [PATCH 09/35] drm/mcde: use drm_panel_bridge_add() Dmitry Baryshkov
2026-10-27 14:13 ` Linus Walleij
2026-10-30 17:28 ` Luca Ceresoli
2026-10-26 11:09 ` [PATCH 10/35] drm/pl111: " Dmitry Baryshkov
2026-10-27 14:14 ` Linus Walleij
2026-10-30 17:28 ` Luca Ceresoli
2026-10-26 11:10 ` [PATCH 11/35] drm/rockchip: lvds: " Dmitry Baryshkov
2026-10-30 17:28 ` Luca Ceresoli
2026-10-26 11:10 ` [PATCH 12/35] drm/rockchip: rgb: " Dmitry Baryshkov
2026-10-30 17:28 ` Luca Ceresoli
2026-10-26 11:10 ` [PATCH 13/35] drm/panel: remove the _typed() panel bridge functions Dmitry Baryshkov
2026-10-30 17:28 ` Luca Ceresoli
2026-10-26 11:10 ` [PATCH 14/35] drm/panel: remove drm_panel.connector_type Dmitry Baryshkov
2026-10-26 11:10 ` [PATCH 15/35] drm/bridge: anx6345: set the panel orientation on the connector Dmitry Baryshkov
2026-10-26 11:10 ` [PATCH 16/35] drm/exynos: dpi: " Dmitry Baryshkov
2026-10-26 11:10 ` [PATCH 17/35] drm/fsl-dcu: " Dmitry Baryshkov
2026-10-26 11:10 ` [PATCH 18/35] drm/logicvc: " Dmitry Baryshkov
2026-10-26 11:10 ` [PATCH 19/35] drm/stm: lvds: " Dmitry Baryshkov
2026-10-26 11:10 ` [PATCH 20/35] drm/sun4i: " Dmitry Baryshkov
2026-10-30 3:06 ` Chen-Yu Tsai
2026-10-26 11:10 ` [PATCH 21/35] drm/tegra: sor: " Dmitry Baryshkov
2026-10-26 11:10 ` [PATCH 22/35] drm/panel: drop the orientation workaround from get_modes() Dmitry Baryshkov
2026-10-26 11:10 ` [PATCH 23/35] drm/panel: read the panel orientation in the core Dmitry Baryshkov
2026-10-26 11:10 ` [PATCH 24/35] drm/panel: use the orientation from the panel core Dmitry Baryshkov
2026-10-26 11:10 ` [PATCH 25/35] drm/panel: remove the get_orientation() callback Dmitry Baryshkov
2026-10-26 11:10 ` [PATCH 26/35] drm/bridge: add the connector_init callback Dmitry Baryshkov
2026-10-26 11:10 ` [PATCH 27/35] drm/bridge-connector: let the bridges set up the connector Dmitry Baryshkov
2026-10-27 12:02 ` [PATCH 00/35] drm/panel: let the panels use the atomic state Dmitry Baryshkov
2026-10-30 17:31 ` Luca Ceresoli [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DMICO60J4G03.1QBH2T9SQ7XEZ@bootlin.com \
--to=luca.ceresoli@bootlin.com \
--cc=Frank.Li@nxp.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=agx@sigxcpu.org \
--cc=airlied@gmail.com \
--cc=akoskovich@pm.me \
--cc=alexandre.torgue@foss.st.com \
--cc=alim.akhtar@samsung.com \
--cc=alison.wang@nxp.com \
--cc=andrzej.hajda@intel.com \
--cc=andy.yan@rock-chips.com \
--cc=aweber.kernel@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=casey.connolly@linaro.org \
--cc=corbet@lwn.net \
--cc=cristian_ci@protonmail.com \
--cc=dario.binacchi@amarulasolutions.com \
--cc=david@ixit.cz \
--cc=dianders@chromium.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=dsankouski@gmail.com \
--cc=festevam@gmail.com \
--cc=florian.fainelli@broadcom.com \
--cc=geert+renesas@glider.be \
--cc=hanxu5@huaqin.corp-partner.google.com \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=icenowy@aosc.io \
--cc=igor@reznichenko.net \
--cc=imx@lists.linux.dev \
--cc=inki.dae@samsung.com \
--cc=jagan@amarulasolutions.com \
--cc=jagan@edgeble.ai \
--cc=javierm@redhat.com \
--cc=jernej.skrabec@gmail.com \
--cc=jesszhan0024@gmail.com \
--cc=jo@jsfamily.in \
--cc=jonas@kwiboo.se \
--cc=jonathanh@nvidia.com \
--cc=junjie.cao@linux.dev \
--cc=jyri.sarha@iki.fi \
--cc=kernel@pengutronix.de \
--cc=kernel@puri.sm \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=krzk@kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=linux-tegra@vger.kernel.org \
--cc=lujianhua000@gmail.com \
--cc=m.tretter@pengutronix.de \
--cc=maarten.lankhorst@linux.intel.com \
--cc=magnus.damm@gmail.com \
--cc=marex@denx.de \
--cc=markuss.broks@gmail.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=megi@xff.cz \
--cc=michael@amarulasolutions.com \
--cc=mperttunen@nvidia.com \
--cc=mripard@kernel.org \
--cc=mwalle@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=paul@crapouillou.net \
--cc=paulk@sys-base.io \
--cc=peter.griffin@linaro.org \
--cc=philippe.cornu@foss.st.com \
--cc=raphael.gallais-pou@foss.st.com \
--cc=rdunlap@infradead.org \
--cc=rfoss@kernel.org \
--cc=robert.chiras@nxp.com \
--cc=ryanbrue.dev@gmail.com \
--cc=s.hauer@pengutronix.de \
--cc=samuel@sholland.org \
--cc=setotau@mainlining.org \
--cc=simona@ffwll.ch \
--cc=skhan@linuxfoundation.org \
--cc=stefan@agner.ch \
--cc=stefan@olimex.com \
--cc=sumit.semwal@linaro.org \
--cc=sw0312.kim@samsung.com \
--cc=thierry.reding@kernel.org \
--cc=tomi.valkeinen+renesas@ideasonboard.com \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=tzimmermann@suse.de \
--cc=wens@kernel.org \
--cc=yannick.fertre@foss.st.com \
--cc=yedaya.ka@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®