]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amdgpu: introduce amdgpu_ttm_buffer_entity
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fri, 19 Sep 2025 07:35:03 +0000 (09:35 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 8 Dec 2025 19:27:25 +0000 (14:27 -0500)
commitedf47fb3d12adbd1747b798a454bc36ceb5912f7
tree7e088dcaf62f3c242cd96536babfb04ffa4bcaf4
parenta0f8297068cf5be9e07e765d499a482f5e55d454
drm/amdgpu: introduce amdgpu_ttm_buffer_entity

No functional change for now, but this struct will have more
fields added in the next commit.

This change would introduce synchronisation issue, because
dependencies between successive jobs are not taken care of
properly. For instance, amdgpu_ttm_clear_buffer uses
amdgpu_ttm_map_buffer then amdgpu_ttm_fill_mem which should
use different entities (default_entity then move/clear entity).
To prevent failures for this commit, we limit ourselves to
2 entities: default_entity (which replaces high_pr usages) and
clear_entity (which replaces low_pr usages).

The next commits will deal with these dependencies correctly,
and then we'll be able to use move_entity.

---
v2: renamed amdgpu_ttm_buffer_entity
v4: don't use move_entity in ttm yet
---

Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com> (v3)
Acked-by: Felix Kuehling <felix.kuehling@amd.com> (v3)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c