[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 0/8] drm: replace simple display pipe users with atomic helpers


  • To: Ze Huang <ze.huang@xxxxxxxxxxxxxxxx>, Alexey Brodkin <abrodkin@xxxxxxxxxxxx>, Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>, Maxime Ripard <mripard@xxxxxxxxxx>, David Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>, Joel Stanley <joel@xxxxxxxxx>, Andrew Jeffery <andrew@xxxxxxxxxxxxxxxxxxxx>, Frank Li <Frank.Li@xxxxxxx>, Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>, Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>, Fabio Estevam <festevam@xxxxxxxxx>, Linus Walleij <linusw@xxxxxxxxxx>, Hans de Goede <hansg@xxxxxxxxxx>, Alex Lanzano <lanzano.alex@xxxxxxxxx>, Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
  • From: Thomas Zimmermann <tzimmermann@xxxxxxx>
  • Date: Mon, 14 Sep 2026 14:04:06 +0200
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=susede2_rsa header.d=suse.de header.i="@suse.de" header.h="From:Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To:References:Autocrypt"; dkim=permerror header.s=susede2_ed25519 header.d=suse.de header.i="@suse.de"; dkim=pass header.s=susede2_rsa header.d=suse.de header.i="@suse.de" header.h="From:Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To:References:Autocrypt"; dkim=permerror header.s=susede2_ed25519 header.d=suse.de header.i="@suse.de"
  • Authentication-results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=Skls9UdH; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=VcjQ+Hdk
  • Autocrypt: addr=tzimmermann@xxxxxxx; keydata= xsBNBFs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nWW GKdDegUR5BkDfDg5O/FISymJBHx2Dyoklv5g4BzkgqTqwmaYzsl8UxZKvbaxq0zbehDda8lv hFXodNFMAgTLJlLuDYOGLK2AwbrS3Sp0AEbkpdJBb44qVlGm5bApZouHeJ/+n+7r12+lqdsA EQEAAcLAdgQYAQgAIAIbDBYhBHIX+6yM6c9jRKFo5WgNwR1TC3ojBQJftOH6AAoJEGgNwR1T C3ojVSkIALpAPkIJPQoURPb1VWjh34l0HlglmYHvZszJWTXYwavHR8+k6Baa6H7ufXNQtThR yIxJrQLW6rV5lm7TjhffEhxVCn37+cg0zZ3j7zIsSS0rx/aMwi6VhFJA5hfn3T0TtrijKP4A SAQO9xD1Zk9/61JWk8OysuIh7MXkl0fxbRKWE93XeQBhIJHQfnc+YBLprdnxR446Sh8Wn/2D Ya8cavuWf2zrB6cZurs048xe0UbSW5AOSo4V9M0jzYI4nZqTmPxYyXbm30Kvmz0rYVRaitYJ 4kyYYMhuULvrJDMjZRvaNe52tkKAvMevcGdt38H4KSVXAylqyQOW5zvPc4/sq9c=
  • Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-aspeed@xxxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, imx@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 14 Sep 2026 12:04:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi

Am 26.07.26 um 21:45 schrieb Ze Huang:
struct drm_simple_display_pipe was meant to simplify simple DRM
drivers, but instead adds an extra wrapper around normal DRM atomic
helper setup. As noted in Documentation/gpu/todo.rst, remaining users
should be converted to regular atomic helpers and stop depending on the
simple-KMS interfaces.

This series converts the following drivers:

   - arcpgu
   - aspeed
   - mcde
   - repaper
   - tve200
   - xen frontend

For these drivers:

Reviewed-by: Thomas Zimmermann <tzimmermann@xxxxxxx>

I've taken the rest of the series into drm-misc-next. We had 2 drivers tested and the others are variants of the same.

Best regards
Thomas



Each patch replaces drm_simple_display_pipe_init() with explicit
primary plane, CRTC and encoder setup, and moves the old simple-pipe
callbacks into regular plane and CRTC helper callbacks named according
to local driver conventions.

The conversions preserve helper behavior that used to be implicit in
drm_simple_kms_helper.c, including plane-state validation, CRTC
primary-plane checks, affected-plane propagation, framebuffer prepare
handling, and existing event/vblank flow where applicable.

Result is less helper indirection and more explicit driver-side atomic
wiring, with no remaining simple-KMS dependency in these drivers.

Except for gm12u320, no hardware testing was performed.

This series is based on drm-next-2026-06-27.

AI usage disclosure:
- I wrote the first two commits myself. The remaining patches were completed
   with assistance from AI tools.
- AI tools were also used to review the code and suggest code changes for
   the DRM atomic conversion.

Thanks,
Ze Huang

Signed-off-by: Ze Huang <ze.huang@xxxxxxxxxxxxxxxx>
---
Changes in v3:
- Use atomic state from the commit path consistently in converted helpers:
   fetch new CRTC/plane state from the commit in enable/update/flush paths, and
   use drm_atomic_get_crtc_state() with PTR_ERR() handling in plane atomic_check
   hooks before drm_atomic_helper_check_plane_state().
- Move MCDE one-shot flow start from plane atomic_update() to CRTC
   atomic_flush(), after pending vblank event handling.
- Fix repaper damage update path to skip updates unless CRTC is active.
- Fix arcpgu missing remote encoder node handling and lock CRTC state access in
   debugfs.
- Make container helpers static inline.
- Link to v2: 
https://lore.kernel.org/r/20260716-drm-simple-kms-removal-v2-0-1133a8fc3785@xxxxxxxxxxxxxxxx

Changes in v2:
- common changes:
- create upcast helpers
- use 'commit' as name of struct drm_atomic_commit in atomic helpers
- improve control flow in *_crtc_helper_atomic_check() and
   *_plane_helper_atomic_check()
- Moved page-flip/vblank event handling out of plane update paths and into
   CRTC atomic_flush(), using atomic_flush and disable paths for mcde,
   pl111 and tve200
- arcpgu:
     - remove reduntant mod_supported helper
     - change obsolete mode field to crtc->state->mode
- mcde:
     - drop attach of unused encoder
- tve200:
     - reorder connector/bridge attach
- xen:
     - change possible_crtcs mask to 0
- Link to v1: 
https://patch.msgid.link/20260705-drm-simple-kms-removal-v1-0-b4e1ca053623@xxxxxxxxxxxxxxxx

---
Ze Huang (8):
       drm/arcpgu: replace struct drm_simple_display_pipe with regular atomic 
helpers
       drm/aspeed: replace struct drm_simple_display_pipe with regular atomic 
helpers
       drm/mcde: replace struct drm_simple_display_pipe with regular atomic 
helpers
       drm/pl111: replace struct drm_simple_display_pipe with regular atomic 
helpers
       drm/gm12u320: replace struct drm_simple_display_pipe with regular atomic 
helpers
       drm/repaper: replace struct drm_simple_display_pipe with regular atomic 
helpers
       drm/tve200: replace struct drm_simple_display_pipe with regular atomic 
helpers
       drm/xen: replace struct drm_simple_display_pipe with regular atomic 
helpers

  drivers/gpu/drm/aspeed/aspeed_gfx.h      |  11 +-
  drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c | 203 ++++++++++++++++++-------
  drivers/gpu/drm/aspeed/aspeed_gfx_drv.c  |   3 +-
  drivers/gpu/drm/mcde/mcde_display.c      | 248 ++++++++++++++++++++-----------
  drivers/gpu/drm/mcde/mcde_drm.h          |  12 +-
  drivers/gpu/drm/mcde/mcde_drv.c          |   3 +-
  drivers/gpu/drm/pl111/pl111_display.c    | 199 ++++++++++++++++++-------
  drivers/gpu/drm/pl111/pl111_drm.h        |   5 +-
  drivers/gpu/drm/pl111/pl111_drv.c        |   3 +-
  drivers/gpu/drm/tiny/arcpgu.c            | 201 +++++++++++++++++++------
  drivers/gpu/drm/tiny/gm12u320.c          | 138 +++++++++++++----
  drivers/gpu/drm/tiny/repaper.c           | 138 +++++++++++++----
  drivers/gpu/drm/tve200/tve200_display.c  | 219 ++++++++++++++++++---------
  drivers/gpu/drm/tve200/tve200_drm.h      |   6 +-
  drivers/gpu/drm/tve200/tve200_drv.c      |  12 +-
  drivers/gpu/drm/xen/xen_drm_front.h      |   6 +-
  drivers/gpu/drm/xen/xen_drm_front_kms.c  | 188 ++++++++++++++++-------
  17 files changed, 1155 insertions(+), 440 deletions(-)
---
base-commit: 3696d07837d1df13a5603d77f667685e7dfb3c53
change-id: 20260704-drm-simple-kms-removal-01a031c6a129

Best regards,

--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, (HRB 36809, AG Nürnberg)





 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.