]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdgpu: create multiple clear/move ttm entities
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Thu, 8 Jan 2026 16:11:22 +0000 (17:11 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 17 Apr 2026 19:41:12 +0000 (15:41 -0400)
This enables parallelism of operations.

Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

index 4513095e3ebedec496f08f6fb13257bddf781829..03fc49ac311d24131b9f2a934f4ed38b8d449870 100644 (file)
@@ -2305,8 +2305,8 @@ void amdgpu_ttm_set_buffer_funcs_status(struct amdgpu_device *adev, bool enable)
                        return;
                }
 
-               num_clear_entities = 1;
-               num_move_entities = 1;
+               num_clear_entities = MIN(adev->mman.num_buffer_funcs_scheds, TTM_NUM_MOVE_FENCES);
+               num_move_entities = MIN(adev->mman.num_buffer_funcs_scheds, TTM_NUM_MOVE_FENCES);
                sched = adev->mman.buffer_funcs_scheds[0];
                r = amdgpu_ttm_buffer_entity_init(&adev->mman.gtt_mgr,
                                                  &adev->mman.default_entity,