Skip to content

drm/vmwgfx: Refactor the buffer object code

Zack Rusin dri-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 16 repliesIn review
  2. v17 patches 9 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8drm/vmwgfx: Use the common gem mmap instead of the custom codedrivers/gpu/drm/vmwgfx/Makefile drivers/gpu/drm/vmwgfx/vmwgfx_drv.c drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +2 more+10 -1182 replies
2/8drm/vmwgfx: Remove the duplicate bo_free functiondrivers/gpu/drm/vmwgfx/vmwgfx_bo.c drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +5 more+27 -581 reply
3/8drm/vmwgfx: Rename vmw_buffer_object to vmw_bodrivers/gpu/drm/vmwgfx/vmwgfx_bo.c drivers/gpu/drm/vmwgfx/vmwgfx_bo.h drivers/gpu/drm/vmwgfx/vmwgfx_cmd.c +22 more+419 -3861 reply
4/8drm/vmwgfx: Simplify fb pinningdrivers/gpu/drm/vmwgfx/vmwgfx_bo.c drivers/gpu/drm/vmwgfx/vmwgfx_bo.h drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +2 more+54 -851 reply
5/8drm/vmwgfx: Cleanup the vmw bo usage in the cursor pathsdrivers/gpu/drm/vmwgfx/vmwgfx_bo.h drivers/gpu/drm/vmwgfx/vmwgfx_kms.c+1 -141 reply
6/8drm/vmwgfx: Rename dummy to is_iomemdrivers/gpu/drm/vmwgfx/vmwgfx_kms.c+8 -83 replies
7/8drm/vmwgfx: Abstract placement selectiondrivers/gpu/drm/vmwgfx/vmwgfx_bo.c drivers/gpu/drm/vmwgfx/vmwgfx_bo.h drivers/gpu/drm/vmwgfx/vmwgfx_context.c +19 more+312 -4563 replies
8/8drm/vmwgfx: Stop using raw ttm_buffer_object'sdrivers/gpu/drm/vmwgfx/vmwgfx_bo.c drivers/gpu/drm/vmwgfx/vmwgfx_bo.h drivers/gpu/drm/vmwgfx/vmwgfx_cmd.c +24 more+566 -6912 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchThomas ZimmermannMartin KrastevMaaz Mombasawala
SeriesA-b
1/8R-b R-b R-b R-b
2/8R-b R-b
3/8R-b R-b
4/8R-b R-b
5/8R-b R-b
6/8R-b R-b R-b
7/8R-b R-b
8/8R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/8] drm/vmwgfx: Refactor the buffer object code

From: Zack Rusin <[email protected]>

v2: Fix all the issues which Thomas pointed out in the initial review and split the "simplify fb pinning" change into two commits with the second one being just the rename.

The series refactors the buffer object code to make more alike the other ttm drivers. The placement becomes a property of the bo which makes it a lot easier to correctly validate based on the current usage. vmwgfx tends to do more validation due to forced moves, because the buffer placement sometimes need to change due to userspace commands, i.e. some commands e.g. SURFACE_DMA implies GMR's which are really deprecated in favor of MOB's, but the x11 driver still uses GMR's so buffers tend to flip between GMR's and MOB's a bit when running on X11.

The functionality remains largely unchanged, but the LOC are reduced by about 400 and the groundwork is done for adding prime support with SG ttm buffers.

Zack Rusin (8):
drm/vmwgfx: Use the common gem mmap instead of the custom code drm/vmwgfx: Remove the duplicate bo_free function drm/vmwgfx: Rename vmw_buffer_object to vmw_bo drm/vmwgfx: Simplify fb pinning
drm/vmwgfx: Cleanup the vmw bo usage in the cursor paths drm/vmwgfx: Rename dummy to is_iomem
drm/vmwgfx: Abstract placement selection
drm/vmwgfx: Stop using raw ttm_buffer_object's

 drivers/gpu/drm/vmwgfx/Makefile               |   2 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_bo.c            | 392 +++++++++---------
 drivers/gpu/drm/vmwgfx/vmwgfx_bo.h            | 203 +++++++++
 drivers/gpu/drm/vmwgfx/vmwgfx_cmd.c           |  14 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c        |  53 +--
 drivers/gpu/drm/vmwgfx/vmwgfx_context.c       |  36 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c       |  65 +--
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c           |  26 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h           | 245 +++--------
 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c       | 102 +++--
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c         |   2 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_gem.c           |  89 ++--
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c           | 230 ++++------
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.h           |  43 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c           |  57 ++-
 drivers/gpu/drm/vmwgfx/vmwgfx_mob.c           |  45 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c       |  20 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_page_dirty.c    |  68 ++-
 drivers/gpu/drm/vmwgfx/vmwgfx_resource.c      | 243 +++++------
 drivers/gpu/drm/vmwgfx/vmwgfx_resource_priv.h |  10 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c          |  53 +--
 drivers/gpu/drm/vmwgfx/vmwgfx_shader.c        |  65 +--
 drivers/gpu/drm/vmwgfx/vmwgfx_so.c            |   6 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c          | 323 ++-------------
 drivers/gpu/drm/vmwgfx/vmwgfx_streamoutput.c  |  20 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_surface.c       | 111 ++---
 drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c    | 116 +-----
 drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c      | 110 -----
 drivers/gpu/drm/vmwgfx/vmwgfx_va.c            |   6 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_validation.c    | 150 +++----
 drivers/gpu/drm/vmwgfx/vmwgfx_validation.h    |  10 +-
 31 files changed, 1248 insertions(+), 1667 deletions(-)
 create mode 100644 drivers/gpu/drm/vmwgfx/vmwgfx_bo.h
 delete mode 100644 drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c
Signature · 1 line
2.38.1