Skip to content

RFC Core TTM changes for i915 TTM enabling

Thomas Hellström dri-devel intel-gfx lkml oe-lkp 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5drm/ttm: Add a generic TTM memcpy move for page-based iomemdrivers/gpu/drm/ttm/ttm_bo_util.c include/drm/ttm/ttm_bo_driver.h+407 -1551 reply
2/5drm, drm/i915: Move the memcpy_from_wc functionality to core drmdrivers/gpu/drm/Makefile drivers/gpu/drm/drm_drv.c drivers/gpu/drm/drm_memcpy.c +11 more+83 -760 replies
3/5drm/ttm: Use drm_memcpy_from_wc for TTM bo movesdrivers/gpu/drm/ttm/ttm_bo_util.c+17 -12 replies
4/5drm/ttm: Document and optimize ttm_bo_pipeline_gutting()drivers/gpu/drm/ttm/ttm_bo.c drivers/gpu/drm/ttm/ttm_bo_util.c drivers/gpu/drm/ttm/ttm_tt.c +1 more+75 -232 replies
5/5drm/ttm, drm/amdgpu: Allow the driver some control over swappingdrivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c drivers/gpu/drm/ttm/ttm_bo.c drivers/gpu/drm/ttm/ttm_tt.c+33 -161 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/5] Core TTM changes for i915 TTM enabling

This is mainly a pre-check that the core TTM changes for the initial i915 TTM patch series look reasonably ok.

Main thing is we add the new page-based iomem memcpy util to TTM, and for some speed the copy-from-wc-x86-only prefetching memcpy to core drm. Note that the legacy memcpy path is largely untested. Perhaps can give it some testing on vmwgfx.

A bugfix and some minor optimization for the ttm_bo_pipeline_gutting() idle case

Finally allow the frequently-pinning i915 driver to block swapping of pinned memory that is still on the LRU.

If OK, I'd like to include these as a part of the i915 series.

Cc Christian König <[email protected]>
Cc Dave Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>

Thomas Hellström (5):
drm/ttm: Add a generic TTM memcpy move for page-based iomem drm, drm/i915: Move the memcpy_from_wc functionality to core drm drm/ttm: Use drm_memcpy_from_wc for TTM bo moves drm/ttm: Document and optimize ttm_bo_pipeline_gutting() drm/ttm, drm/amdgpu: Allow the driver some control over swapping

 drivers/gpu/drm/Makefile                      |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c       |   4 +
 drivers/gpu/drm/drm_drv.c                     |   2 +
 .../drm/{i915/i915_memcpy.c => drm_memcpy.c}  |  31 +-
 drivers/gpu/drm/i915/Makefile                 |   1 -
 .../gpu/drm/i915/gem/i915_gem_execbuffer.c    |   4 +-
 drivers/gpu/drm/i915/gem/i915_gem_object.c    |   5 +-
 drivers/gpu/drm/i915/gt/selftest_reset.c      |   7 +-
 drivers/gpu/drm/i915/gt/uc/intel_guc_log.c    |  11 +-
 drivers/gpu/drm/i915/i915_cmd_parser.c        |   4 +-
 drivers/gpu/drm/i915/i915_drv.c               |   2 -
 drivers/gpu/drm/i915/i915_gpu_error.c         |   8 +-
 drivers/gpu/drm/i915/i915_memcpy.h            |  34 --
 .../drm/i915/selftests/intel_memory_region.c  |   7 +-
 drivers/gpu/drm/ttm/ttm_bo.c                  |  61 +-
 drivers/gpu/drm/ttm/ttm_bo_util.c             | 547 ++++++++++++------
 drivers/gpu/drm/ttm/ttm_tt.c                  |   9 +
 include/drm/drm_memcpy.h                      |  41 ++
 include/drm/ttm/ttm_bo_driver.h               |  94 +++
 include/drm/ttm/ttm_tt.h                      |  10 +
 20 files changed, 614 insertions(+), 270 deletions(-)
 rename drivers/gpu/drm/{i915/i915_memcpy.c => drm_memcpy.c} (84%)
 delete mode 100644 drivers/gpu/drm/i915/i915_memcpy.h
 create mode 100644 include/drm/drm_memcpy.h
Signature · 1 line
2.31.1