]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdkfd: allocate MMIO/DOORBELL BOs with AMDGPU_GEM_CREATE_PREEMPTIBLE
authorLang Yu <Lang.Yu@amd.com>
Wed, 11 May 2022 07:37:27 +0000 (15:37 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 16 May 2022 14:02:57 +0000 (10:02 -0400)
commit8646ae552cf3160571e68c4114031f49fd17f5ca
tree857c0ff9525522d8df6bd289dd533b2b1ab8ceee
parent9b429e36612329a13c2208a0255fa6c311a05cdb
drm/amdkfd: allocate MMIO/DOORBELL BOs with AMDGPU_GEM_CREATE_PREEMPTIBLE

MMIO/DOORBELL BOs' backing resources(bus address resources that are
used to talk to the GPU) are not managed by GTT manager, but they
are counted by GTT manager. That makes no sense.

With AMDGPU_GEM_CREATE_PREEMPTIBLE flag, such BOs will be managed by
PREEMPT manager(for preemptible contexts, e.g., KFD). Then they won't
be evicted and don't need to be pinned as well.

But we still leave these BOs pinned to indicate that the underlying
resource never moves.

Signed-off-by: Lang Yu <Lang.Yu@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c