Skip to content

Remove explicit locking and kmap arguments from GEM VRAM interface

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. v3 Latest9 patches 2 repliesIn review
  2. v29 patches 8 repliesSuperseded

Changes in v3 from the cover letter

* document PRIME pin flags
* pin cursor BOs at current location

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9drm/gem-vram: Support pinning buffers to current locationdrivers/gpu/drm/drm_gem_vram_helper.c+16 -40 replies
2/9drm/ast: Unpin cursor BO during cleanupdrivers/gpu/drm/ast/ast_mode.c+1 -00 replies
3/9drm/ast: Remove obsolete or unused cursor statedrivers/gpu/drm/ast/ast_drv.h drivers/gpu/drm/ast/ast_mode.c+17 -210 replies
4/9drm/ast: Pin and map cursor source BO during updatedrivers/gpu/drm/ast/ast_mode.c+16 -210 replies
5/9drm/ast: Pin framebuffer BO during dirty updatedrivers/gpu/drm/ast/ast_fb.c+16 -170 replies
6/9drm/mgag200: Pin framebuffer BO during dirty updatedrivers/gpu/drm/mgag200/mgag200_fb.c+14 -130 replies
7/9drm/mgag200: Rewrite cursor handlingdrivers/gpu/drm/mgag200/mgag200_cursor.c drivers/gpu/drm/mgag200/mgag200_drv.h drivers/gpu/drm/mgag200/mgag200_main.c+69 -1030 replies
8/9drm: Remove lock interfaces from GEM VRAM helpersdrivers/gpu/drm/drm_gem_vram_helper.c include/drm/drm_gem_vram_helper.h+0 -1141 reply
9/9drm: Remove functions with kmap-object argument from GEM VRAM helpersdrivers/gpu/drm/drm_gem_vram_helper.c include/drm/drm_gem_vram_helper.h+8 -460 replies

Reviews trailers per patch

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

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

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/9] Remove explicit locking and kmap arguments from GEM VRAM interface

Drivers should not have to care about internal locking of GEM VRAM objects and their memory-mapping structures. This patch set removes both from the GEM VRAM interface.

This affects the ast and mgag200 drivers. In places where GEM objects are being locked by the driver, the patch converts the lock operation to a pin operation. The locking prevented the memory manager from moving the object, so pinning is more appropriate.

For the memory mappings, all book-keeping is done by the implementation of GEM VRAM. Explicit kmap objects are removed from the module's public interfaces. This change mostly affects the cursor handling in ast and mgag200, which is being simplified by this patch set.

Future directions: with these patches in place, more code in mode setting and fbdev emulation can be shared between ast and mgag200.

The patches have been tested on ast and mgag200 hardware.

v3:
* document PRIME pin flags
* pin cursor BOs at current location
v2:
* support pinning BOs at current location
* pin PRIME buffers to current location

Thomas Zimmermann (9):
drm/gem-vram: Support pinning buffers to current location drm/ast: Unpin cursor BO during cleanup
drm/ast: Remove obsolete or unused cursor state
drm/ast: Pin and map cursor source BO during update drm/ast: Pin framebuffer BO during dirty update drm/mgag200: Pin framebuffer BO during dirty update drm/mgag200: Rewrite cursor handling
drm: Remove lock interfaces from GEM VRAM helpers
drm: Remove functions with kmap-object argument from GEM VRAM helpers

 drivers/gpu/drm/ast/ast_drv.h            |   7 -
 drivers/gpu/drm/ast/ast_fb.c             |  33 ++---
 drivers/gpu/drm/ast/ast_mode.c           |  65 ++++----
 drivers/gpu/drm/drm_gem_vram_helper.c    | 179 +++--------------------
 drivers/gpu/drm/mgag200/mgag200_cursor.c | 165 +++++++++------------
 drivers/gpu/drm/mgag200/mgag200_drv.h    |   3 -
 drivers/gpu/drm/mgag200/mgag200_fb.c     |  27 ++--
 drivers/gpu/drm/mgag200/mgag200_main.c   |   4 +-
 include/drm/drm_gem_vram_helper.h        |   9 --
 9 files changed, 155 insertions(+), 337 deletions(-)

--
2.21.0

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