]> 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)
commit6db884bcca9d4499e9b8d4446064e54befdc8434
tree857c0ff9525522d8df6bd289dd533b2b1ab8ceee
parentaad1e87c826e1c80a4924fc1254180aae401e2f3
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