All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zack Rusin <zack@kde.org>
To: dri-devel@lists.freedesktop.org
Cc: krastevm@vmware.com, banackm@vmware.com, mombasawalam@vmware.com
Subject: [PATCH 0/7] drm/vmwgfx: Refactor the buffer object code
Date: Thu, 26 Jan 2023 12:38:06 -0500	[thread overview]
Message-ID: <20230126173813.602748-1-zack@kde.org> (raw)

From: Zack Rusin <zackr@vmware.com>

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 (7):
  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: 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            | 401 +++++++++---------
 drivers/gpu/drm/vmwgfx/vmwgfx_bo.h            | 217 ++++++++++
 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           | 243 ++---------
 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c       | 103 +++--
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c         |   2 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_gem.c           |  86 ++--
 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    |  59 ++-
 drivers/gpu/drm/vmwgfx/vmwgfx_resource.c      | 239 ++++++-----
 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, 1266 insertions(+), 1655 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


             reply	other threads:[~2023-01-26 17:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-26 17:38 Zack Rusin [this message]
2023-01-26 17:38 ` [PATCH 1/7] drm/vmwgfx: Use the common gem mmap instead of the custom code Zack Rusin
2023-01-27 13:46   ` Thomas Zimmermann
2023-01-27 16:23   ` Martin Krastev (VMware)
2023-01-26 17:38 ` [PATCH 2/7] drm/vmwgfx: Remove the duplicate bo_free function Zack Rusin
2023-01-27 17:00   ` Martin Krastev (VMware)
2023-01-26 17:38 ` [PATCH 3/7] drm/vmwgfx: Rename vmw_buffer_object to vmw_bo Zack Rusin
2023-01-27 13:51   ` Thomas Zimmermann
2023-01-27 17:06   ` Martin Krastev (VMware)
2023-01-26 17:38 ` [PATCH 4/7] drm/vmwgfx: Simplify fb pinning Zack Rusin
2023-01-27 18:53   ` Martin Krastev (VMware)
2023-01-26 17:38 ` [PATCH 5/7] drm/vmwgfx: Cleanup the vmw bo usage in the cursor paths Zack Rusin
2023-01-27 13:12   ` Thomas Zimmermann
2023-01-27 18:57   ` Martin Krastev (VMware)
2023-01-26 17:38 ` [PATCH 6/7] drm/vmwgfx: Abstract placement selection Zack Rusin
2023-01-27 13:42   ` Thomas Zimmermann
2023-01-28 15:09   ` kernel test robot
2023-01-28 15:09     ` kernel test robot
2023-01-26 17:38 ` [PATCH 7/7] drm/vmwgfx: Stop using raw ttm_buffer_object's Zack Rusin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230126173813.602748-1-zack@kde.org \
    --to=zack@kde.org \
    --cc=banackm@vmware.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=krastevm@vmware.com \
    --cc=mombasawalam@vmware.com \
    --cc=zackr@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.