From: "Luca Ceresoli" <luca.ceresoli@bootlin.com>
To: "Dmitry Baryshkov" <dmitry.baryshkov@oss.qualcomm.com>,
"Maxime Ripard" <mripard@kernel.org>
Cc: "Andrzej Hajda" <andrzej.hajda@intel.com>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"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>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Jonathan Corbet" <corbet@lwn.net>,
"Shuah Khan" <skhan@linuxfoundation.org>,
"Randy Dunlap" <rdunlap@infradead.org>,
"Jessica Zhang" <jesszhan0024@gmail.com>,
"Konrad Dybcio" <konradybcio@kernel.org>,
"Val Packett" <val@packett.cool>,
<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
<linux-doc@vger.kernel.org>
Subject: Re: [PATCH RFC 0/9] drm/panel: add atomic state
Date: Tue, 13 Oct 2026 15:47:15 +0200 [thread overview]
Message-ID: <DM3R9KIGS2XF.35DX6I83JKPYO@bootlin.com> (raw)
In-Reply-To: <lm7u5tcnccbtbxqeyyqzzvmmhpy2dfhgnyz3giqtt5toejy7pj@7bwixidtqxfz>
On Tue Oct 13, 2026 at 1:57 PM CEST, Dmitry Baryshkov wrote:
> On Tue, Oct 13, 2026 at 10:37:19AM +0200, Maxime Ripard wrote:
>> On Tue, Oct 13, 2026 at 10:51:38AM +0300, Dmitry Baryshkov wrote:
>> > On Mon, Oct 12, 2026 at 08:40:33AM +0200, Maxime Ripard wrote:
>> > > On Thu, Oct 08, 2026 at 04:14:22PM +0300, Dmitry Baryshkov wrote:
>> > > > Panel drivers don't have an atomic state and so they can't handle
>> > > > additional data to be stored at the atomic_check time or to be retrieved
>> > > > at the enable/disable time. For example, it prevents panel drivers from
>> > > > supporting multiple display modes or making DSC being optional in a
>> > > > clean way. Drivers like panel-novatek-nt35950, save the connector
>> > > > pointer in get_modes() and later dereference
>> > > > connector->state->crtc->state from prepare() without holding any locks.
>> > > > The panels also have no way to reject the configuration they cann't
>> > > > handle, as it doesn't take part in the atomic check.
>> > > >
>> > > > The panel already embeds a drm_bridge, and the bridge has an atomic
>> > > > state which is property handled. Subclass it to provide atomic state for
>> > > > the panels. The callbacks can find the state of the other related
>> > > > objects (e.g. CRTC state to get the display mode).
>> > > >
>> > > > The atomic state is opt-in. A panel that doesn't implement the state
>> > > > callbacks keeps working exactly as before, with the plain bridge state,
>> > > > so there is no need to touch the existing drivers. The panels which do
>> > > > implement them can only be driven through the embedded bridge, since
>> > > > there is no commit to hand over when the host calls drm_panel_prepare()
>> > > > and friends directly. Those entry points warn and refuse to handle such
>> > > > panels. There are still a dozen of display drivers calling these
>> > > > functions, and the panels used with them can not be converted until the
>> > > > hosts are switched to the panel bridge.
>> > >
>> > > I really don't think we should extend the panel API. All panels are
>> > > bridges now, consumers only care about bridges as well, and the bridges
>> > > API provides what you want already.
>> > >
>> > > Why not simply turn the panel drivers we want into bridges, possibly
>> > > with a bunch of specialized helpers to manage a panel state, and call it
>> > > a day?
>> >
>> > I think that panels provide good abstraction on top of the drm_bridge.
>> > For example, bridges don't have orientation, panels do.
>>
>> That's easy to add.
>
> What would it mean for the bridge? I was thinking about pulling
> orientation from the per-panel code to a generic code path, including
> reading and handling it. I'm not sure if it should be done in the
> drm_bridge code if we declare drm_panel deprecated.
>
>> > Also panels have followers, while bridges do not.
>>
>> Ditto
>>
>> > I don't think that either of those APIs make sense for bridge.
>>
>> Why not? In a world where we have bridge hotplug for example, it would
>> make total sense to me to have bridge followers. I think Luca even had
>> that at some point in his series (and still might?).
There's a simple notifier mechanism: see core [0] (with currently psoposed
events [1]) and users [2][3].
The events [1] and their semantics are not well defined as of now, so we
are still on time to decide from the beginning whether it should be very
bridge-hotplug-specific or have a wider scope.
[0] https://lore.kernel.org/lkml/20261001-drm-bridge-hotplug-v2-14-8e34986dcb68@bootlin.com/
[1] https://lore.kernel.org/lkml/20261001-drm-bridge-hotplug-v2-14-8e34986dcb68@bootlin.com/#Z31include:drm:drm_event_notifier.h
[2] https://lore.kernel.org/lkml/20261001-drm-bridge-hotplug-v2-15-8e34986dcb68@bootlin.com/
[3] https://lore.kernel.org/lkml/20261001-drm-bridge-hotplug-v2-16-8e34986dcb68@bootlin.com/
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2026-10-13 13:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 13:14 [PATCH RFC 0/9] drm/panel: add atomic state Dmitry Baryshkov
2026-10-08 13:14 ` [PATCH RFC 1/9] drm/bridge: terminate the lines of the bridge state dump Dmitry Baryshkov
2026-10-08 13:14 ` [PATCH RFC 2/9] drm/bridge: add atomic_print_state callback Dmitry Baryshkov
2026-10-08 13:14 ` [PATCH RFC 3/9] drm/bridge: drop the bridge pointer from drm_bridge_state Dmitry Baryshkov
2026-10-08 13:14 ` [PATCH RFC 4/9] drm/panel: add atomic state Dmitry Baryshkov
2026-10-08 13:14 ` [PATCH RFC 5/9] drm/panel: add atomic_check callback Dmitry Baryshkov
2026-10-08 13:14 ` [PATCH RFC 6/9] drm/panel: factor out the panel follower notifications Dmitry Baryshkov
2026-10-08 13:14 ` [PATCH RFC 7/9] drm/panel: add atomic variants of the enable and disable callbacks Dmitry Baryshkov
2026-10-08 13:14 ` [PATCH RFC 8/9] drm/panel: add atomic_print_state callback Dmitry Baryshkov
2026-10-08 13:14 ` [PATCH RFC 9/9] drm/panel: novatek-nt35950: use the atomic state to select the mode Dmitry Baryshkov
2026-10-13 12:51 ` Neil Armstrong
2026-10-11 20:43 ` [PATCH RFC 0/9] drm/panel: add atomic state Val Packett
2026-10-12 6:40 ` Maxime Ripard
2026-10-13 7:51 ` Dmitry Baryshkov
2026-10-13 8:37 ` Maxime Ripard
2026-10-13 11:57 ` Dmitry Baryshkov
2026-10-13 13:47 ` 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=DM3R9KIGS2XF.35DX6I83JKPYO@bootlin.com \
--to=luca.ceresoli@bootlin.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=corbet@lwn.net \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=jesszhan0024@gmail.com \
--cc=jonas@kwiboo.se \
--cc=konradybcio@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rdunlap@infradead.org \
--cc=rfoss@kernel.org \
--cc=simona@ffwll.ch \
--cc=skhan@linuxfoundation.org \
--cc=tzimmermann@suse.de \
--cc=val@packett.cool \
/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