dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/12] drm/ast: Move cursor vmap calls out of commit tail
@ 2021-01-27 12:02 Thomas Zimmermann
  2021-01-27 12:02 ` [PATCH 01/12] drm/ast: Add constants for VGACRCB register bits Thomas Zimmermann
                   ` (11 more replies)
  0 siblings, 12 replies; 14+ messages in thread
From: Thomas Zimmermann @ 2021-01-27 12:02 UTC (permalink / raw)
  To: airlied, daniel; +Cc: Thomas Zimmermann, dri-devel

Ast has vmap calls in its cursor's atomic_update function. This is not
supported as vmap might aquire the dma reservation lock. While at it,
cleanup the whole cursor code: the patchset removes all possible runtime
errors from the atomic_update function and reduces the overhead from
vmap calls on the HW cursor BOs to a minimum.

Patches 1 to 3 update the cursor code and prepare before the refactoring.

Patch 4 and 5 inline the cursor update logic into the rsp cursor-plane
functions. This is mostly about moving code around.

Patches 6 to 8 and 12 add a dedicated cursor plane that maintains the two
BOs for HW cursors. The HW cursor BOs are permanently pinned and vmapped
while the cursor plane is initialized. Thus removing the related vmap
operations from atomic_update.

Patches 9 to 11 moves more vmap code out of atomic_update. BOs with cursor
image data from userspace are vmapped and vunmapped in prepare_fb and
cleanup_fb. Instead the actual update of the cursor image is moved from
prepare_fb to atomic_update.

With the patchset applied, all cursor preparation is performed before
the commit-tail functions; while the actual update is performed within.

Tested by running X11 and Weston on ast hardware.

Thomas Zimmermann (12):
  drm/ast: Add constants for VGACRCB register bits
  drm/ast: Fix invalid usage of AST_MAX_HWC_WIDTH in cursor atomic_check
  drm/ast: Initialize planes in helper functions
  drm/ast: Allocate HW cursor BOs during cursor-plane initialization
  drm/ast: Inline ast cursor-update functions into modesetting code
  drm/ast: Add cursor-plane data structure
  drm/ast: Store cursor BOs in cursor plane
  drm/ast: Map HW cursor BOs permanently
  drm/ast: Introduce dedicated cursor-plane state
  drm/ast: Fix cursor BO pinning and mapping
  drm/ast: Move all of the cursor-update functionality to atomic_update
  drm/ast: Store each HW cursor offset after pinning the rsp BO

 drivers/gpu/drm/ast/Makefile     |   3 +-
 drivers/gpu/drm/ast/ast_cursor.c | 286 ----------------------
 drivers/gpu/drm/ast/ast_drv.h    |  47 ++--
 drivers/gpu/drm/ast/ast_mode.c   | 397 +++++++++++++++++++++++++++----
 4 files changed, 389 insertions(+), 344 deletions(-)
 delete mode 100644 drivers/gpu/drm/ast/ast_cursor.c


base-commit: 3836b7fdfad40e2bac5dc882332f42bed6942cf4
prerequisite-patch-id: c2b2f08f0eccc9f5df0c0da49fa1d36267deb11d
--
2.30.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2021-01-27 13:41 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27 12:02 [PATCH 00/12] drm/ast: Move cursor vmap calls out of commit tail Thomas Zimmermann
2021-01-27 12:02 ` [PATCH 01/12] drm/ast: Add constants for VGACRCB register bits Thomas Zimmermann
2021-01-27 12:02 ` [PATCH 02/12] drm/ast: Fix invalid usage of AST_MAX_HWC_WIDTH in cursor atomic_check Thomas Zimmermann
2021-01-27 12:02 ` [PATCH 03/12] drm/ast: Initialize planes in helper functions Thomas Zimmermann
2021-01-27 12:02 ` [PATCH 04/12] drm/ast: Allocate HW cursor BOs during cursor-plane initialization Thomas Zimmermann
2021-01-27 12:02 ` [PATCH 05/12] drm/ast: Inline ast cursor-update functions into modesetting code Thomas Zimmermann
2021-01-27 12:02 ` [PATCH 06/12] drm/ast: Add cursor-plane data structure Thomas Zimmermann
2021-01-27 12:02 ` [PATCH 07/12] drm/ast: Store cursor BOs in cursor plane Thomas Zimmermann
2021-01-27 12:02 ` [PATCH 08/12] drm/ast: Map HW cursor BOs permanently Thomas Zimmermann
2021-01-27 12:02 ` [PATCH 09/12] drm/ast: Introduce dedicated cursor-plane state Thomas Zimmermann
2021-01-27 12:03 ` [PATCH 10/12] drm/ast: Fix cursor BO pinning and mapping Thomas Zimmermann
2021-01-27 13:40   ` Thomas Zimmermann
2021-01-27 12:03 ` [PATCH 11/12] drm/ast: Move all of the cursor-update functionality to atomic_update Thomas Zimmermann
2021-01-27 12:03 ` [PATCH 12/12] drm/ast: Store each HW cursor offset after pinning the rsp BO 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).