dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] amdgpu: Allow explicitly synchronized submissions.
@ 2022-08-13  1:27 Bas Nieuwenhuizen
  2022-08-13  1:27 ` [PATCH 1/6] drm/ttm: Add usage to ttm_validate_buffer Bas Nieuwenhuizen
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Bas Nieuwenhuizen @ 2022-08-13  1:27 UTC (permalink / raw)
  To: dri-devel, amd-gfx; +Cc: christian.koenig

This adds a context option to use DMA_RESV_USAGE_BOOKKEEP for userspace submissions,
based on Christians TTM work.

Disabling implicit sync is something we've wanted in radv for a while for resolving
some corner cases. A more immediate thing that would be solved here is avoiding a
bunch of implicit sync on GPU map/unmap operations as well, which helps with stutter
around sparse maps/unmaps.

This has seen a significant improvement in stutter in Forza Horizon 5 and Forza
Horizon 4. (As games that had significant issues in sparse binding related stutter).
I've been able to pass a full vulkan-cts run on navi21 with this.

Userspace code for this is available at
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18032 and a branch
for the kernel code is available at
https://github.com/BNieuwenhuizen/linux/tree/no-implicit-sync-5.19

This is a follow-up on RFC series https://patchwork.freedesktop.org/series/104578/ .

The main changes were:

1) Instead of replacing num_shared with usage, I'm just adding usage, since
   num_shared was actually needed.
2) We now agree that DMA_RESV_USAGE_BOOKKEEP is reasonable for this purpose.

Please let me know if I missed anything, especially with the change to VM updates,
as we went back and forth a ton of times on that.


Bas Nieuwenhuizen (6):
  drm/ttm: Add usage to ttm_validate_buffer.
  drm/amdgpu: Add separate mode for syncing DMA_RESV_USAGE_BOOKKEEP.
  drm/amdgpu: Allow explicit sync for VM ops.
  drm/amdgpu: Refactor amdgpu_vm_get_pd_bo.
  drm/amdgpu: Add option to disable implicit sync for a context.
  drm/amdgpu: Bump amdgpu driver version.

 .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c  | 16 +++++++---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c        | 20 +++++++++---
 drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c       |  3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c       | 32 +++++++++++++++++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h       |  1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |  3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c       | 12 ++++---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c       |  3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c    | 11 ++++---
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.h    |  3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c      | 11 +++++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_sync.h      |  4 +--
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c       |  1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c       |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c        |  5 ++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h        |  3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c    |  3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c   |  3 +-
 drivers/gpu/drm/amd/amdkfd/kfd_svm.c          |  1 +
 drivers/gpu/drm/qxl/qxl_release.c             |  1 +
 drivers/gpu/drm/radeon/radeon_cs.c            |  2 ++
 drivers/gpu/drm/radeon/radeon_gem.c           |  1 +
 drivers/gpu/drm/radeon/radeon_vm.c            |  2 ++
 drivers/gpu/drm/ttm/ttm_execbuf_util.c        |  3 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_resource.c      |  7 +++-
 drivers/gpu/drm/vmwgfx/vmwgfx_validation.c    |  1 +
 include/drm/ttm/ttm_execbuf_util.h            |  2 ++
 include/uapi/drm/amdgpu_drm.h                 |  3 ++
 28 files changed, 122 insertions(+), 37 deletions(-)

-- 
2.37.1


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

end of thread, other threads:[~2022-08-24 18:46 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-13  1:27 [PATCH 0/6] amdgpu: Allow explicitly synchronized submissions Bas Nieuwenhuizen
2022-08-13  1:27 ` [PATCH 1/6] drm/ttm: Add usage to ttm_validate_buffer Bas Nieuwenhuizen
2022-08-17 22:04   ` Felix Kuehling
2022-08-18  0:30     ` Bas Nieuwenhuizen
2022-08-18  9:33       ` Christian König
2022-08-13  1:27 ` [PATCH 2/6] drm/amdgpu: Add separate mode for syncing DMA_RESV_USAGE_BOOKKEEP Bas Nieuwenhuizen
2022-08-13  1:27 ` [PATCH 3/6] drm/amdgpu: Allow explicit sync for VM ops Bas Nieuwenhuizen
2022-08-13  1:27 ` [PATCH 4/6] drm/amdgpu: Refactor amdgpu_vm_get_pd_bo Bas Nieuwenhuizen
2022-08-13  1:28 ` [PATCH 5/6] drm/amdgpu: Add option to disable implicit sync for a context Bas Nieuwenhuizen
2022-08-13  1:28 ` [PATCH 6/6] drm/amdgpu: Bump amdgpu driver version Bas Nieuwenhuizen
2022-08-18 13:20 ` [PATCH 0/6] amdgpu: Allow explicitly synchronized submissions Christian König
2022-08-21 23:08   ` Bas Nieuwenhuizen
2022-08-23 10:15     ` Christian König
2022-08-23 22:35       ` Bas Nieuwenhuizen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).