Skip to content

drm/mgag200: Place cursor BOs at VRAM high-end

Thomas Zimmermann dri-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest posting 2/27 patches 1 replyIn review
  2. v3 posting 1/25 patches 2 repliesSuperseded
  3. v212 patches 4 repliesSuperseded

Changes in v3 from the cover letter

* split-off mgag200 patches into separate series

Patches in v3 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7drm/mgag200: Rename cursor functions to use mgag200_ prefixdrivers/gpu/drm/mgag200/mgag200_cursor.c drivers/gpu/drm/mgag200/mgag200_drv.h drivers/gpu/drm/mgag200/mgag200_mode.c+13 -160 replies
2/7drm/mgag200: Add init and fini functions for cursor handlingdrivers/gpu/drm/mgag200/mgag200_cursor.c drivers/gpu/drm/mgag200/mgag200_drv.h drivers/gpu/drm/mgag200/mgag200_main.c+35 -130 replies
3/7drm/mgag200: Add separate move-cursor functiondrivers/gpu/drm/mgag200/mgag200_cursor.c+20 -90 replies
4/7drm/mgag200: Move cursor-image update to mgag200_show_cursor()drivers/gpu/drm/mgag200/mgag200_cursor.c+125 -950 replies
5/7drm/mgag200: Move cursor BO swapping into mgag200_show_cursor()drivers/gpu/drm/mgag200/mgag200_cursor.c+56 -640 replies
6/7drm/mgag200: Reserve video memory for cursor planedrivers/gpu/drm/mgag200/mgag200_cursor.c drivers/gpu/drm/mgag200/mgag200_drv.h drivers/gpu/drm/mgag200/mgag200_main.c +2 more+23 -60 replies
7/7drm/mgag200: Allocate cursor BOs at high end of video memorydrivers/gpu/drm/mgag200/mgag200_cursor.c drivers/gpu/drm/mgag200/mgag200_drv.h+52 -540 replies

Reviews trailers per patch

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

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

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

Read the v3 thread

Cover letter [PATCH v3 0/7] drm/mgag200: Place cursor BOs at VRAM high-end

(was: drm/ast/mgag200: Place cursor BOs at VRAM high-end)

This patchset cleans up the memory management of HW cursors in mgag200. It further moves the allocated cursor BOs to the of the video RAM to reduce memory fragmentation.

The mgag200 driver manages cursor memory in dedicated GEM VRAM buffer objects. It uses a double-buffering scheme of alternating between two GEM BOs The code is convoluted and can lead to memory fragmentation if a BO is stored the middle of VRAM. This is especially a problem as mgag200 devices only contain a small amount of video memory (e.g., 16 MiB).

With this patchset, the cursor handling in mgag200 is first split up into separate functions for copying cursor images, managing buffer objects, setting scanout addresses, and moving and hiding the cursor. Furthermore, the driver dedicates a few KiB at the high end of a device's video memory to storing the cursor's buffer objects. This prevents memory fragmentation.

The patchset has been tested on mgag200 hardware.

v3:
* split-off mgag200 patches into separate series
v2:
* remove VRAM buffers in favor of GEM BOs
* manage BO placement with pin flag

Thomas Zimmermann (7):
drm/mgag200: Rename cursor functions to use mgag200_ prefix drm/mgag200: Add init and fini functions for cursor handling drm/mgag200: Add separate move-cursor function drm/mgag200: Move cursor-image update to mgag200_show_cursor() drm/mgag200: Move cursor BO swapping into mgag200_show_cursor() drm/mgag200: Reserve video memory for cursor plane drm/mgag200: Allocate cursor BOs at high end of video memory

 drivers/gpu/drm/mgag200/mgag200_cursor.c | 313 ++++++++++++++---------
 drivers/gpu/drm/mgag200/mgag200_drv.h    |  22 +-
 drivers/gpu/drm/mgag200/mgag200_main.c   |  20 +-
 drivers/gpu/drm/mgag200/mgag200_mode.c   |   6 +-
 drivers/gpu/drm/mgag200/mgag200_ttm.c    |   4 +
 5 files changed, 216 insertions(+), 149 deletions(-)

--
2.23.0

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