public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH v7 0/6] drm/i915/ttm: Async migration
@ 2021-11-22 21:45 Thomas Hellström
  2021-11-22 21:45 ` [Intel-gfx] [PATCH v7 1/6] drm/i915: Add support for moving fence waiting Thomas Hellström
                   ` (21 more replies)
  0 siblings, 22 replies; 26+ messages in thread
From: Thomas Hellström @ 2021-11-22 21:45 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: Thomas Hellström, matthew.auld

This patch series deals with async migration and async vram management.
It still leaves an important part out, which is async unbinding which
will reduce latency further, at least when trying to migrate already active
objects.

Patch 1/6 deals with accessing and waiting for the TTM moving
fence from i915 GEM.
Patch 2 is pure code reorganization, no functional change.
Patch 3 breaks a refcounting loop involving the TTM moving fence.
Patch 4 makes the i915 TTM shinking code handle async moves.
Patch 5 uses TTM to implement the ttm move() callback async, it also
introduces a utility to collect dependencies and turn them into a
single dma_fence, which is needed for the intel_migrate code.
This also affects the gem object migrate code.
Patch 6 makes the object copy utility async as well, mainly for future
users since the only current user, suspend backup and restore, typically
will want to sync anyway.

v2:
- Fix a couple of SPARSE warnings.
v3:
- Fix a NULL pointer dereference.
v4:
- Squash what was previously patch 1 and 2 to patch1
- Ditch the moving fence waiting in i915_vma_pin_iomap()
- Rework how the refcounting loop is broken in patch 3. Drop region
  reference counting.
- Break what is now patch 4 out of patch 5. Add support for avoiding
  waiting for gpu when shrinking.
- A number of changes in patch 5. See the commit message for details.
v5:
- Some fixes to i915_vma_verify_bind_complete() (Matthew Auld)
- Update patches with R-B.
v6:
- Code comment update
- Re-check for fence signaled before returning -EBUSY (Matthew Auld)
- Use dma_resv_iter_is_exclusive() (Matthew Auld)
- Await all dma-resv fences before a migration blit (Matthew Auld)
v7:
- Fix yet another compilation failure in patch 1.

Maarten Lankhorst (1):
  drm/i915: Add support for moving fence waiting

Thomas Hellström (5):
  drm/i915/ttm: Move the i915_gem_obj_copy_ttm() function
  drm/i915/ttm: Drop region reference counting
  drm/i915/ttm: Correctly handle waiting for gpu when shrinking
  drm/i915/ttm: Implement asynchronous TTM moves
  drm/i915/ttm: Update i915_gem_obj_copy_ttm() to be asynchronous

 drivers/gpu/drm/i915/gem/i915_gem_object.c    |  52 +++
 drivers/gpu/drm/i915/gem/i915_gem_object.h    |   6 +
 .../gpu/drm/i915/gem/i915_gem_object_types.h  |   1 +
 drivers/gpu/drm/i915/gem/i915_gem_pages.c     |   6 +
 drivers/gpu/drm/i915/gem/i915_gem_region.c    |   4 +-
 drivers/gpu/drm/i915/gem/i915_gem_shmem.c     |   3 +-
 drivers/gpu/drm/i915/gem/i915_gem_shrinker.c  |   1 +
 drivers/gpu/drm/i915/gem/i915_gem_stolen.c    |   6 +-
 drivers/gpu/drm/i915/gem/i915_gem_ttm.c       |  89 ++--
 drivers/gpu/drm/i915/gem/i915_gem_ttm.h       |   6 +-
 drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c  | 409 ++++++++++++++++--
 drivers/gpu/drm/i915/gem/i915_gem_ttm_move.h  |  10 +-
 drivers/gpu/drm/i915/gem/i915_gem_ttm_pm.c    |   3 +
 drivers/gpu/drm/i915/gem/i915_gem_wait.c      |   4 +-
 .../gpu/drm/i915/gem/selftests/huge_pages.c   |   2 +-
 drivers/gpu/drm/i915/gt/intel_region_lmem.c   |  10 +-
 drivers/gpu/drm/i915/i915_vma.c               |  43 +-
 drivers/gpu/drm/i915/intel_memory_region.c    |  26 +-
 drivers/gpu/drm/i915/intel_memory_region.h    |   9 +-
 drivers/gpu/drm/i915/intel_region_ttm.c       |  35 +-
 drivers/gpu/drm/i915/intel_region_ttm.h       |   2 +-
 .../drm/i915/selftests/intel_memory_region.c  |   8 +-
 drivers/gpu/drm/i915/selftests/mock_region.c  |   7 +-
 23 files changed, 599 insertions(+), 143 deletions(-)

-- 
2.31.1


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

end of thread, other threads:[~2021-11-25 10:27 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-22 21:45 [Intel-gfx] [PATCH v7 0/6] drm/i915/ttm: Async migration Thomas Hellström
2021-11-22 21:45 ` [Intel-gfx] [PATCH v7 1/6] drm/i915: Add support for moving fence waiting Thomas Hellström
2021-11-22 21:45 ` [Intel-gfx] [PATCH v7 2/6] drm/i915/ttm: Move the i915_gem_obj_copy_ttm() function Thomas Hellström
2021-11-22 21:45 ` [Intel-gfx] [PATCH v7 3/6] drm/i915/ttm: Drop region reference counting Thomas Hellström
2021-11-22 21:45 ` [Intel-gfx] [PATCH v7 4/6] drm/i915/ttm: Correctly handle waiting for gpu when shrinking Thomas Hellström
2021-11-22 21:45 ` [Intel-gfx] [PATCH v7 5/6] drm/i915/ttm: Implement asynchronous TTM moves Thomas Hellström
2021-11-22 21:45 ` [Intel-gfx] [PATCH v7 6/6] drm/i915/ttm: Update i915_gem_obj_copy_ttm() to be asynchronous Thomas Hellström
2021-11-22 22:14 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/ttm: Async migration (rev8) Patchwork
2021-11-22 22:49 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2021-11-23  6:27 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/ttm: Async migration (rev9) Patchwork
2021-11-23  6:58 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2021-11-23  7:37 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/ttm: Async migration (rev10) Patchwork
2021-11-23  8:05 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-11-23  9:45 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-11-24  7:50 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/ttm: Async migration (rev11) Patchwork
2021-11-24  8:19 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-11-24  9:42 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-11-24 10:56   ` Thomas Hellström
2021-11-24 15:51     ` Thomas Hellström
2021-11-24 20:16     ` Vudum, Lakshminarayana
2021-11-24 18:48 ` Patchwork
2021-11-24 18:55 ` Patchwork
2021-11-24 19:12 ` [Intel-gfx] ✓ Fi.CI.IGT: success " Patchwork
2021-11-25  8:42 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/ttm: Async migration (rev12) Patchwork
2021-11-25  9:12 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-11-25 10:27 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox