All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/8] drm/vmwgfx: Refactor the buffer object code
@ 2023-01-31  3:35 Zack Rusin
  2023-01-31  3:35 ` [PATCH v2 1/8] drm/vmwgfx: Use the common gem mmap instead of the custom code Zack Rusin
                   ` (8 more replies)
  0 siblings, 9 replies; 25+ messages in thread
From: Zack Rusin @ 2023-01-31  3:35 UTC (permalink / raw)
  To: dri-devel; +Cc: krastevm, banackm, mombasawalam

From: Zack Rusin <zackr@vmware.com>

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

-- 
2.38.1


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

end of thread, other threads:[~2023-03-14  7:16 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-31  3:35 [PATCH v2 0/8] drm/vmwgfx: Refactor the buffer object code Zack Rusin
2023-01-31  3:35 ` [PATCH v2 1/8] drm/vmwgfx: Use the common gem mmap instead of the custom code Zack Rusin
2023-01-31 15:15   ` Martin Krastev (VMware)
2023-01-31 23:47   ` "Maaz Mombasawala (VMware)
2023-01-31  3:35 ` [PATCH v2 2/8] drm/vmwgfx: Remove the duplicate bo_free function Zack Rusin
2023-01-31 23:50   ` "Maaz Mombasawala (VMware)
2023-01-31  3:35 ` [PATCH v2 3/8] drm/vmwgfx: Rename vmw_buffer_object to vmw_bo Zack Rusin
2023-02-01  0:31   ` "Maaz Mombasawala (VMware)
2023-01-31  3:35 ` [PATCH v2 4/8] drm/vmwgfx: Simplify fb pinning Zack Rusin
2023-02-01  0:33   ` "Maaz Mombasawala (VMware)
2023-01-31  3:35 ` [PATCH v2 5/8] drm/vmwgfx: Cleanup the vmw bo usage in the cursor paths Zack Rusin
2023-02-01  0:34   ` "Maaz Mombasawala (VMware)
2023-01-31  3:35 ` [PATCH v2 6/8] drm/vmwgfx: Rename dummy to is_iomem Zack Rusin
2023-01-31  8:08   ` Thomas Zimmermann
2023-01-31 17:57   ` Martin Krastev (VMware)
2023-02-01  0:34   ` "Maaz Mombasawala (VMware)
2023-01-31  3:35 ` [PATCH v2 7/8] drm/vmwgfx: Abstract placement selection Zack Rusin
2023-01-31 17:56   ` Martin Krastev (VMware)
2023-02-01  0:37   ` "Maaz Mombasawala (VMware)
2023-03-14  7:16     ` Dave Airlie
2023-01-31  3:35 ` [PATCH v2 8/8] drm/vmwgfx: Stop using raw ttm_buffer_object's Zack Rusin
2023-01-31 18:52   ` Martin Krastev (VMware)
2023-02-01  0:39   ` "Maaz Mombasawala (VMware)
2023-01-31 19:28 ` [PATCH v2 0/8] drm/vmwgfx: Refactor the buffer object code Thomas Zimmermann
2023-02-01 17:53   ` Zack Rusin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.