drm/amdgpu: Simplify AQL queue mapping
authorFelix Kuehling <Felix.Kuehling@amd.com>
Fri, 9 Apr 2021 03:26:27 +0000 (23:26 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 20 May 2021 02:43:52 +0000 (22:43 -0400)
commit7141394edc05f439751e4eb2e5aedb4889b48e33
tree11a9f762a7fe74c5c8595905fc75b736649797ae
parent4e94272f8a99e0235353a024f37be1201acf4c8b
drm/amdgpu: Simplify AQL queue mapping

Do AQL queue double-mapping with a single attach call. That will make it
easier to create per-GPU BOs later, to be shared between the two BO VA
mappings on the same GPU.

Freeing the attachments is not necessary if map_to_gpu fails. These will be
cleaned up when the kdg_mem object is destroyed in
amdgpu_amdkfd_gpuvm_free_memory_of_gpu.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Oak Zeng <Oak.Zeng@amd.com>
Acked-by: Ramesh Errabolu <Ramesh.Errabolu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c