All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] drm/plane: Remove drm_plane_init(), plus other cleanups
@ 2022-09-09 10:59 ` Thomas Zimmermann
  0 siblings, 0 replies; 54+ messages in thread
From: Thomas Zimmermann @ 2022-09-09 10:59 UTC (permalink / raw)
  To: maarten.lankhorst, mripard, airlied, daniel, bskeggs, kherbst,
	lyude, laurent.pinchart, kieran.bingham+renesas, jyri.sarha,
	tomba, sam
  Cc: dri-devel, nouveau, linux-renesas-soc, Thomas Zimmermann

This patchset does cleanups to the plane code, most noteably it removes
drm_plane_init(). The function is a small wrapper, which can easily be
inlined into the few callers. Patch #1 fixes this.

The other clean-up patches #2 to #4 affect plane creation. Modesetting
helpers and nouveau share some plane-allocation code that can be shared as
helper function. While the function is already outdated, it's now at least
well documented. As suggested by Daniel, patch #3 adds a warning to
non-atomic plane helpers when they are being called from atomic drivers.
Patch #4 adds an initializer macro for non-atomic plane functions. It
should not be used in new drivers, but at least documents the current
practice.

Tested with nouveau on Nvidia G72 hardware.

A possible next step would be the inlining of drm_crtc_init() and the
removal of drm_plane.format_default.

Thomas Zimmermann (4):
  drm/plane: Remove drm_plane_init()
  drm/plane: Allocate planes with drm_universal_plane_alloc()
  drm/plane-helper: Warn if atomic drivers call non-atomic helpers
  drm/plane-helper: Provide DRM_PLANE_NON_ATOMIC_FUNCS initializer macro

 drivers/gpu/drm/drm_modeset_helper.c       | 68 +++++++++------------
 drivers/gpu/drm/drm_plane.c                | 70 ++++++++++++----------
 drivers/gpu/drm/drm_plane_helper.c         | 10 ++++
 drivers/gpu/drm/nouveau/dispnv04/crtc.c    | 45 +++++---------
 drivers/gpu/drm/nouveau/dispnv04/overlay.c | 13 ++--
 drivers/gpu/drm/shmobile/shmob_drm_plane.c |  7 ++-
 drivers/gpu/drm/tilcdc/tilcdc_plane.c      |  9 ++-
 include/drm/drm_plane.h                    | 52 +++++++++++++---
 include/drm/drm_plane_helper.h             | 12 ++++
 9 files changed, 162 insertions(+), 124 deletions(-)


base-commit: f2c3a05d33693ad51996fa7d12d3b2d4b0f372eb
prerequisite-patch-id: c2b2f08f0eccc9f5df0c0da49fa1d36267deb11d
prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24
prerequisite-patch-id: 3f204510fcbf9530d6540bd8e6128cce598988b6
-- 
2.37.2


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

end of thread, other threads:[~2022-09-20 21:24 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-09 10:59 [PATCH 0/4] drm/plane: Remove drm_plane_init(), plus other cleanups Thomas Zimmermann
2022-09-09 10:59 ` Thomas Zimmermann
2022-09-09 10:59 ` [Nouveau] " Thomas Zimmermann
2022-09-09 10:59 ` [PATCH 1/4] drm/plane: Remove drm_plane_init() Thomas Zimmermann
2022-09-09 10:59   ` Thomas Zimmermann
2022-09-09 10:59   ` [Nouveau] " Thomas Zimmermann
2022-09-09 18:24   ` Lyude Paul
2022-09-09 18:24     ` Lyude Paul
2022-09-09 18:24     ` [Nouveau] " Lyude Paul
2022-09-16 11:00   ` Javier Martinez Canillas
2022-09-16 11:00     ` [Nouveau] " Javier Martinez Canillas
2022-09-16 11:05   ` Laurent Pinchart
2022-09-16 11:05     ` Laurent Pinchart
2022-09-16 11:05     ` [Nouveau] " Laurent Pinchart
2022-09-09 10:59 ` [PATCH 2/4] drm/plane: Allocate planes with drm_universal_plane_alloc() Thomas Zimmermann
2022-09-09 10:59   ` Thomas Zimmermann
2022-09-09 10:59   ` [Nouveau] " Thomas Zimmermann
2022-09-16 11:06   ` Laurent Pinchart
2022-09-16 11:06     ` Laurent Pinchart
2022-09-16 11:06     ` [Nouveau] " Laurent Pinchart
2022-09-16 11:31     ` Thomas Zimmermann
2022-09-16 11:31       ` Thomas Zimmermann
2022-09-16 11:31       ` [Nouveau] " Thomas Zimmermann
2022-09-19 14:45       ` Laurent Pinchart
2022-09-19 14:45         ` Laurent Pinchart
2022-09-19 14:45         ` [Nouveau] " Laurent Pinchart
2022-09-16 11:22   ` Javier Martinez Canillas
2022-09-16 11:22     ` [Nouveau] " Javier Martinez Canillas
2022-09-16 11:41     ` Thomas Zimmermann
2022-09-16 11:41       ` [Nouveau] " Thomas Zimmermann
2022-09-16 11:51       ` Javier Martinez Canillas
2022-09-16 11:51         ` [Nouveau] " Javier Martinez Canillas
2022-09-09 10:59 ` [PATCH 3/4] drm/plane-helper: Warn if atomic drivers call non-atomic helpers Thomas Zimmermann
2022-09-09 10:59   ` Thomas Zimmermann
2022-09-09 10:59   ` [Nouveau] " Thomas Zimmermann
2022-09-16 11:20   ` Laurent Pinchart
2022-09-16 11:20     ` Laurent Pinchart
2022-09-16 11:20     ` [Nouveau] " Laurent Pinchart
2022-09-16 11:23   ` Javier Martinez Canillas
2022-09-16 11:23     ` [Nouveau] " Javier Martinez Canillas
2022-09-09 10:59 ` [PATCH 4/4] drm/plane-helper: Provide DRM_PLANE_NON_ATOMIC_FUNCS initializer macro Thomas Zimmermann
2022-09-09 10:59   ` Thomas Zimmermann
2022-09-09 10:59   ` [Nouveau] " Thomas Zimmermann
2022-09-16 11:22   ` Laurent Pinchart
2022-09-16 11:22     ` Laurent Pinchart
2022-09-16 11:22     ` [Nouveau] " Laurent Pinchart
2022-09-16 11:24   ` Javier Martinez Canillas
2022-09-16 11:24     ` [Nouveau] " Javier Martinez Canillas
2022-09-09 18:39 ` [PATCH 0/4] drm/plane: Remove drm_plane_init(), plus other cleanups Lyude Paul
2022-09-09 18:39   ` Lyude Paul
2022-09-09 18:39   ` [Nouveau] " Lyude Paul
2022-09-13  9:06 ` [PATCH 1/4] drm/plane: Remove drm_plane_init() jyri.sarha
2022-09-13  9:06   ` jyri.sarha
2022-09-13  9:06   ` [Nouveau] " jyri.sarha

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.