mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH RFC 0/9] drm/panel: add atomic state
@ 2026-10-08 13:14 Dmitry Baryshkov
  2026-10-08 13:14 ` [PATCH RFC 1/9] drm/bridge: terminate the lines of the bridge state dump Dmitry Baryshkov
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Dmitry Baryshkov @ 2026-10-08 13:14 UTC (permalink / raw)
  To: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, Luca Ceresoli, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Jonathan Corbet, Shuah Khan, Randy Dunlap, Jessica Zhang,
	Konrad Dybcio, Val Packett
  Cc: dri-devel, linux-kernel, linux-doc

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.

The previous attempt by Val Packett <val@packett.cool> ([1]), but it had
issues with the API design, passing NULL for the state. This approach
follows closer the path that was chosen for drm_bridge conversion.

The series is marked as RFC as it is only compiled-tested only.

[1] https://lore.kernel.org/r/20260425001130.233935-1-val@packett.cool/

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
Dmitry Baryshkov (9):
      drm/bridge: terminate the lines of the bridge state dump
      drm/bridge: add atomic_print_state callback
      drm/bridge: drop the bridge pointer from drm_bridge_state
      drm/panel: add atomic state
      drm/panel: add atomic_check callback
      drm/panel: factor out the panel follower notifications
      drm/panel: add atomic variants of the enable and disable callbacks
      drm/panel: add atomic_print_state callback
      drm/panel: novatek-nt35950: use the atomic state to select the mode

 Documentation/gpu/drm-kms-helpers.rst         |   3 +
 drivers/gpu/drm/drm_atomic_state_helper.c     |   2 -
 drivers/gpu/drm/drm_bridge.c                  |  15 +-
 drivers/gpu/drm/drm_panel.c                   | 634 ++++++++++++++++++++++++--
 drivers/gpu/drm/panel/panel-novatek-nt35950.c | 159 +++++--
 include/drm/drm_atomic.h                      |   5 -
 include/drm/drm_bridge.h                      |   9 +
 include/drm/drm_panel.h                       | 190 ++++++++
 8 files changed, 915 insertions(+), 102 deletions(-)
---
base-commit: 5d7b464a4f517d1db533b1b231f42ddcf4e1dff4
change-id: 20261007-panel-atomic-state-05948a804545

Best regards,
--  
With best wishes
Dmitry


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-10-08 13:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

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®