Skip to content

drm/ast: Clean-up cursor-plane updates

Thomas Zimmermann dri-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest10 patches 1 replyIn review
  2. v112 patches 1 replySuperseded

Changes in v2 from the cover letter

* convert to drm_shadow_plane_state helpers

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10drm/ast: Add constants for VGACRCB register bitsdrivers/gpu/drm/ast/ast_cursor.c drivers/gpu/drm/ast/ast_drv.h+18 -60 replies
2/10drm/ast: Fix invalid usage of AST_MAX_HWC_WIDTH in cursor atomic_checkdrivers/gpu/drm/ast/ast_mode.c+1 -10 replies
3/10drm/ast: Initialize planes in helper functionsdrivers/gpu/drm/ast/ast_mode.c+45 -210 replies
4/10drm/ast: Allocate HW cursor BOs during cursor-plane initializationdrivers/gpu/drm/ast/ast_cursor.c drivers/gpu/drm/ast/ast_drv.h drivers/gpu/drm/ast/ast_mode.c+55 -660 replies
5/10drm/ast: Inline ast cursor-update functions into modesetting codedrivers/gpu/drm/ast/Makefile drivers/gpu/drm/ast/ast_cursor.c drivers/gpu/drm/ast/ast_drv.h +1 more+181 -2570 replies
6/10drm/ast: Add cursor-plane data structuredrivers/gpu/drm/ast/ast_drv.h drivers/gpu/drm/ast/ast_mode.c+25 -30 replies
7/10drm/ast: Store cursor BOs in cursor planedrivers/gpu/drm/ast/ast_drv.h drivers/gpu/drm/ast/ast_mode.c+21 -170 replies
8/10drm/ast: Map HW cursor BOs permanentlydrivers/gpu/drm/ast/ast_drv.h drivers/gpu/drm/ast/ast_mode.c+16 -170 replies
9/10drm/ast: Store each HW cursor offset after pinning the rsp BOdrivers/gpu/drm/ast/ast_drv.h drivers/gpu/drm/ast/ast_mode.c+12 -100 replies
10/10drm/ast: Move all of the cursor-update functionality to atomic_updatedrivers/gpu/drm/ast/ast_mode.c+22 -440 replies

Reviews trailers per patch

None of the 10 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchGerd Hoffmann
SeriesA-b
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/10] drm/ast: Clean-up cursor-plane updates

(was: drm/ast: Move cursor vmap calls out of commit tail)

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 9 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.

Finally patch 10 converts ast cursors to struct drm_shadow_plane_state. BOs with cursor image data from userspace are vmapped in prepare_fb and vunampped in cleanup_fb. The actual update of the cursor image is being 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.

v2:
* convert to drm_shadow_plane_state helpers

Thomas Zimmermann (10):
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: Store each HW cursor offset after pinning the rsp BO drm/ast: Move all of the cursor-update functionality to atomic_update

 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   | 334 +++++++++++++++++++++++++------
 4 files changed, 312 insertions(+), 358 deletions(-)
 delete mode 100644 drivers/gpu/drm/ast/ast_cursor.c

--
2.30.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel