From: Pierre-Eric Pelloux-Prayer Date: Thu, 8 Jan 2026 16:11:22 +0000 (+0100) Subject: drm/amdgpu: create multiple clear/move ttm entities X-Git-Tag: v7.2-rc1~141^2~24^2~190 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=897ee11ec0209aa90184b5a69d0e172d007dce3a;p=thirdparty%2Flinux.git drm/amdgpu: create multiple clear/move ttm entities This enables parallelism of operations. Signed-off-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 4513095e3ebed..03fc49ac311d2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -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,