]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Add new placement for preemptible SG BOs
authorFelix Kuehling <Felix.Kuehling@amd.com>
Wed, 5 May 2021 19:18:53 +0000 (15:18 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 21 May 2021 21:59:59 +0000 (17:59 -0400)
commit0e8e20d6718aeae207868536d900904bf099590b
treeec01dca5c5328631a937a3ff9d18ce02725e4b75
parente204799bc25b5c97d17f4f5ff3cca9917e94db4d
drm/amdgpu: Add new placement for preemptible SG BOs

SG BOs such as dmabuf imports and userptr BOs do not consume system
resources directly. Instead they point to resources owned elsewhere.
They typically get evicted by DMABuf move notifiers of MMU notifiers.
If those notifiers don't need to wait for hardware fences (i.e. the SG
BOs are used in a preemptible context), then we don't need to limit
them to the GTT size and we don't need TTM to evict them.

Create a new placement for such preemptible SG BOs that does not impose
artificial size limits and TTM evictions.

Signed-off-by: Felix Kuehling <Felix.Kuehling@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/Makefile
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
drivers/gpu/drm/amd/amdgpu/amdgpu_preempt_mgr.c [new file with mode: 0644]
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
include/uapi/drm/amdgpu_drm.h