Skip to content

drm/amdgpu: use all SDMA instances for TTM clears and moves

Pierre-Eric Pelloux-Prayer amd-gfx dri-devel linux-media lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest12 patches 1 replyIn review
  2. v328 patches 31 repliesSuperseded
  3. v220 patches 32 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v120 patches19 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12drm/amdgpu: allocate clear entities dynamicallydrivers/gpu/drm/amd/amdgpu/amdgpu_object.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h+42 -180 replies
2/12drm/amdgpu: allocate move entities dynamicallydrivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h drivers/gpu/drm/amd/amdkfd/kfd_migrate.c+25 -150 replies
3/12drm/amdgpu: round robin through clear_entities in amdgpu_fill_bufferdrivers/gpu/drm/amd/amdgpu/amdgpu_object.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h+20 -50 replies
4/12drm/amdgpu: use TTM_NUM_MOVE_FENCES when reserving fencesdrivers/gpu/drm/amd/amdgpu/amdgpu_cs.c drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c drivers/gpu/drm/amd/amdkfd/kfd_svm.c +2 more+9 -170 replies
5/12drm/amdgpu: use multiple entities in amdgpu_move_blitdrivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h+10 -40 replies
6/12drm/amdgpu: pass all the sdma scheds to amdgpu_mmandrivers/gpu/drm/amd/amdgpu/amdgpu.h drivers/gpu/drm/amd/amdgpu/amdgpu_device.c drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +14 more+47 -420 replies
7/12drm/amdgpu: only use working sdma schedulers for ttmdrivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c drivers/gpu/drm/amd/amdgpu/cik_sdma.c drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c +9 more+67 -260 replies
8/12drm/amdgpu: create multiple clear/move ttm entitiesdrivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c+2 -20 replies
9/12drm/amdgpu: give ttm entities access to all the sdma schedsdrivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c+9 -70 replies
10/12drm/amdgpu: get rid of amdgpu_ttm_clear_bufferdrivers/gpu/drm/amd/amdgpu/amdgpu_object.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h+32 -780 replies
11/12drm/amdgpu: rename amdgpu_fill_buffer as amdgpu_ttm_clear_bufferdrivers/gpu/drm/amd/amdgpu/amdgpu_object.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h+22 -260 replies
12/12drm/amdgpu: split amdgpu_ttm_set_buffer_funcs_status in 2 funcsdrivers/gpu/drm/amd/amdgpu/amdgpu_device.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h+108 -960 replies

Reviews trailers per patch

7 of 12 patches have a Reviewed-by or Acked-by.

PatchFelix KuehlingChristian König
1/12
2/12A-b
3/12R-b
4/12A-b R-b
5/12R-b
6/12A-b
7/12
8/12
9/12R-b
10/12
11/12R-b
12/12

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

Read the v4 thread

Cover letter [PATCH v4 00/12] drm/amdgpu: use all SDMA instances for TTM clears and moves

The drm/ttm patch modifies TTM to support multiple contexts for the pipelined moves.

Then amdgpu/ttm is updated to express dependencies between jobs explicitely, instead of relying on the ordering of execution guaranteed by the use of a single instance.
With all of this in place, we can use multiple entities, with each having access to the available SDMA instances.

This rework also gives the opportunity to merge the clear functions into a single one and to optimize a bit GART usage.

Since v3 some patches have been already reviewed and merged separately:
- https://lists.freedesktop.org/archives/amd-gfx/2026-January/137747.html
- https://gitlab.freedesktop.org/drm/kernel/-/commit/ddf055b80a544d6f36f77be5f0c6d3c80177d57c
This version depend on them.

v3: https://lists.freedesktop.org/archives/dri-devel/2025-November/537830.html

Pierre-Eric Pelloux-Prayer (12):
drm/amdgpu: allocate clear entities dynamically drm/amdgpu: allocate move entities dynamically drm/amdgpu: round robin through clear_entities in amdgpu_fill_buffer drm/amdgpu: use TTM_NUM_MOVE_FENCES when reserving fences drm/amdgpu: use multiple entities in amdgpu_move_blit drm/amdgpu: pass all the sdma scheds to amdgpu_mman drm/amdgpu: only use working sdma schedulers for ttm drm/amdgpu: create multiple clear/move ttm entities drm/amdgpu: give ttm entities access to all the sdma scheds drm/amdgpu: get rid of amdgpu_ttm_clear_buffer drm/amdgpu: rename amdgpu_fill_buffer as amdgpu_ttm_clear_buffer drm/amdgpu: split amdgpu_ttm_set_buffer_funcs_status in 2 funcs

 drivers/gpu/drm/amd/amdgpu/amdgpu.h           |   2 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c        |   5 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c    |  16 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c    |  17 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c       | 329 ++++++++++--------
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h       |  29 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c      |   6 +-
 drivers/gpu/drm/amd/amdgpu/cik_sdma.c         |  13 +-
 drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c        |   8 +-
 drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c        |   8 +-
 drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c        |  15 +-
 drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c      |  12 +-
 drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c        |  11 +-
 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c        |  14 +-
 drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c        |   5 +-
 drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c        |   5 +-
 drivers/gpu/drm/amd/amdgpu/sdma_v7_1.c        |  12 +-
 drivers/gpu/drm/amd/amdgpu/si_dma.c           |  12 +-
 drivers/gpu/drm/amd/amdkfd/kfd_migrate.c      |   5 +-
 drivers/gpu/drm/amd/amdkfd/kfd_svm.c          |   3 +-
 .../amd/display/amdgpu_dm/amdgpu_dm_plane.c   |   6 +-
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_wb.c  |   6 +-
 23 files changed, 300 insertions(+), 243 deletions(-)
Signature · 1 line
2.43.0