Skip to content

drm/i915: Move system memory to TTM for discrete

Thomas Hellström dri-devel intel-gfx 10 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v10 Latest3 patches 0 repliesNew
  2. v93 patches 0 repliesSuperseded
  3. v83 patches 0 repliesSuperseded
Earlier versions · 7
VersionPostedPatchesRepliesStatus
v73 patches4 repliesSuperseded
v63 patches3 repliesSuperseded
v54 patches0 repliesSuperseded
v44 patches2 repliesSuperseded
v34 patches4 repliesSuperseded
v24 patches5 repliesSuperseded
v15 patches7 repliesSuperseded

Changes in v10 from the cover letter

- Add some comments around the gem object "mem_flags" field, and use a full unsigned int for it. (Suggested by Daniel Vetter).
- Add an object locked section while checking mem_flags in the live mman selftest.

Patches in v10 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3drm/i915: Update object placement flags to be mutabledrivers/gpu/drm/i915/gem/i915_gem_internal.c drivers/gpu/drm/i915/gem/i915_gem_lmem.c drivers/gpu/drm/i915/gem/i915_gem_lmem.h +14 more+123 -520 replies
2/3drm/i915/ttm: Adjust gem flags and caching settings after a movedrivers/gpu/drm/i915/gem/i915_gem_ttm.c+108 -360 replies
3/3drm/i915/ttm: Use TTM for system memorydrivers/gpu/drm/i915/gem/i915_gem_region.c drivers/gpu/drm/i915/gem/i915_gem_shmem.c drivers/gpu/drm/i915/gem/i915_gem_ttm.c +3 more+58 -180 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchMatthew Auld
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v10 thread

Cover letter [PATCH v10 0/3] drm/i915: Move system memory to TTM for discrete

Early implementation of moving system memory for discrete cards over to TTM. We first add the notion of objects being migratable under the object lock to i915 gem, and add some asserts to verify that objects are either locked or pinned when the placement is checked by the gem code.

Patch 2 deals with updating the i915 gem bookkeeping after a TTM move, Patch 3 moves system over from shmem to TTM for discrete

Note that the mock device doesn't consider itself discrete so the TTM system path is not checked by the mock selftests.

v2:
- Style fixes (reported by Matthew Auld)
- Drop the last patch (migration) It needs selftests and some additional work.
- Unconditionally add VM_IO at mmap time.

v3:
- More style fixes (reported by Matthew Auld)
- Don't overfill the busy placement vector (reported by Matthew Auld)

v4:
- Remove confusion around shrinkable objects (reported by Matthew Auld)

v5:
- Remove confusion around shrinkable objects again, but this time in the correct patch. (reported by Matthew Auld)

v6:
- One patch already committed.
- Introduce a __i915_gem_object_is_lmem() to be used in situations where we know that a fence that can't currently signal keeps the object from being migrated or evicted.
- Rebase on accelerated TTM moves
- Fix TODO:s for supporting system memory with TTM.
- Update the object GEM region after a TTM move if compatible.
- Move a couple of warnings for shmem on DGFX.

v7:
- Just updated a commit message with version history under dashes.

v8:
- Reinstate alignment at ttm_bo_init_reserved() time. (Reported by Matthew Auld).
- When changing regions, also move the object to the new region list and break early. (Reported by Matthew Auld).
- Don't flag the object as contiguous based on the current region min pages size.
v9:
- Remove a DGFX warning in __i915_gem_object_release_shmem since it is called from the userptr code.
v10:
- Add some comments around the gem object "mem_flags" field, and use a full unsigned int for it. (Suggested by Daniel Vetter).
- Add an object locked section while checking mem_flags in the live mman selftest.

Thomas Hellström (3):
drm/i915: Update object placement flags to be mutable drm/i915/ttm: Adjust gem flags and caching settings after a move drm/i915/ttm: Use TTM for system memory

 drivers/gpu/drm/i915/gem/i915_gem_internal.c  |   4 +-
 drivers/gpu/drm/i915/gem/i915_gem_lmem.c      |  22 ++
 drivers/gpu/drm/i915/gem/i915_gem_lmem.h      |   2 +
 drivers/gpu/drm/i915/gem/i915_gem_mman.c      |  12 +-
 drivers/gpu/drm/i915/gem/i915_gem_object.c    |  38 ++++
 drivers/gpu/drm/i915/gem/i915_gem_object.h    |  14 +-
 .../gpu/drm/i915/gem/i915_gem_object_types.h  |  27 ++-
 drivers/gpu/drm/i915/gem/i915_gem_pages.c     |   2 +-
 drivers/gpu/drm/i915/gem/i915_gem_phys.c      |   2 +-
 drivers/gpu/drm/i915/gem/i915_gem_region.c    |   4 -
 drivers/gpu/drm/i915/gem/i915_gem_shmem.c     |   9 +-
 drivers/gpu/drm/i915/gem/i915_gem_ttm.c       | 196 ++++++++++++++----
 drivers/gpu/drm/i915/gem/i915_gem_userptr.c   |   4 +-
 .../drm/i915/gem/selftests/huge_gem_object.c  |   4 +-
 .../gpu/drm/i915/gem/selftests/huge_pages.c   |   5 +-
 .../drm/i915/gem/selftests/i915_gem_mman.c    |  25 ++-
 .../drm/i915/gem/selftests/i915_gem_phys.c    |   3 +-
 drivers/gpu/drm/i915/i915_drv.h               |   3 -
 drivers/gpu/drm/i915/i915_gpu_error.c         |   2 +-
 drivers/gpu/drm/i915/intel_memory_region.c    |   7 +-
 drivers/gpu/drm/i915/intel_memory_region.h    |   8 +
 21 files changed, 288 insertions(+), 105 deletions(-)
Signature · 6 lines
2.31.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx