]> 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)
commite24f6665e367ba4c96c30300628276087d33ac49
treeec01dca5c5328631a937a3ff9d18ce02725e4b75
parentb51f91388a8cb671a64e5e79374bfcdb51c57e54
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