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)
commit7226f40af6fcb48bd3f5ff63ee68ff5530dbdd75
tree857c0ff9525522d8df6bd289dd533b2b1ab8ceee
parentb992a19085885c096b19625a85c674cb89829ca1
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