dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] drm: Add new plane helpers to begin/end FB access
@ 2022-10-25 10:17 Thomas Zimmermann
  2022-10-25 10:17 ` [PATCH v2 1/2] drm/atomic-helper: Add {begin, end}_fb_access to plane helpers Thomas Zimmermann
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Thomas Zimmermann @ 2022-10-25 10:17 UTC (permalink / raw)
  To: daniel, airlied, mripard, maarten.lankhorst, javierm
  Cc: Thomas Zimmermann, dri-devel

This patchset adds the callbacks begin_fb_access and end_fb_access
to struct drm_plane_helper_funcs. They provide hooks to acquire and
release resources that are only held during the commit. It adds
related simple-KMS helpers and converts shadow-plane helpers.

As resource allocation often can fail, we have to do this before an
atomic commit starts the update in order to handle the error. But
prepare_fb is only reverted after the next pageflip. We want to
reduce the time resources are held for a commit, which requires the
new hooks.

With this in place, move shadow-plane helpers' automatic vmap/vunmap
behind the new callbacks. The shadow-plane mapping is only required
during the atomic commit.

Tested with combinations of radeon, udl and simpledrm under X11, Weston
and Wayland-Gnome.

Thomas Zimmermann (2):
  drm/atomic-helper: Add {begin,end}_fb_access to plane helpers
  drm/gem: Implement shadow-plane {begin,end}_fb_access with vmap

 drivers/gpu/drm/drm_atomic_helper.c      | 34 ++++++++++--
 drivers/gpu/drm/drm_gem_atomic_helper.c  | 66 +++++++++++-------------
 drivers/gpu/drm/drm_simple_kms_helper.c  | 26 ++++++++++
 include/drm/drm_gem_atomic_helper.h      | 20 +++----
 include/drm/drm_modeset_helper_vtables.h | 41 ++++++++++++++-
 include/drm/drm_simple_kms_helper.h      | 20 +++++++
 6 files changed, 157 insertions(+), 50 deletions(-)


base-commit: 746559738f1335241ea686566cb654847c20d7a4
-- 
2.38.0


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

end of thread, other threads:[~2022-11-08 12:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-25 10:17 [PATCH v2 0/2] drm: Add new plane helpers to begin/end FB access Thomas Zimmermann
2022-10-25 10:17 ` [PATCH v2 1/2] drm/atomic-helper: Add {begin, end}_fb_access to plane helpers Thomas Zimmermann
2022-11-08 12:10   ` [PATCH v2 1/2] drm/atomic-helper: Add {begin,end}_fb_access " Javier Martinez Canillas
2022-10-25 10:17 ` [PATCH v2 2/2] drm/gem: Implement shadow-plane {begin, end}_fb_access with vmap Thomas Zimmermann
2022-11-08 12:18   ` [PATCH v2 2/2] drm/gem: Implement shadow-plane {begin,end}_fb_access " Javier Martinez Canillas
2022-10-31  9:46 ` [PATCH v2 0/2] drm: Add new plane helpers to begin/end FB access Thomas Zimmermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).