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)
commitb453e42a6e8b9fa4580011e923963248c56b9d4d
treeec01dca5c5328631a937a3ff9d18ce02725e4b75
parent6abb3f434c00281b338b5d7a547c57d93e0b9782
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