drm/amdgpu: KFD graphics interop support compute partition
authorPhilip Yang <Philip.Yang@amd.com>
Fri, 10 Mar 2023 00:30:02 +0000 (19:30 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 14:36:41 +0000 (10:36 -0400)
commit2fa9ff25de08e598af051c76b216d2f073b2ee89
treed7e98fc5ce57d54f5dfbde396f7cbb5d62db077e
parent3ebfd221c1a83e5f0edadb87d173d8fd93d1d125
drm/amdgpu: KFD graphics interop support compute partition

kfd_ioctl_get_dmabuf use the amdgpu bo xcp_id to get the gpu_id of the
KFD node from the exported dmabuf_adev, and then create kfd bo on the
correct adev and KFD node when importing the amdgpu bo to KFD.

Remove function kfd_device_by_adev, it is not needed as it is the same
result as dmabuf_adev->kfd.dev->nodes[0]->id.

Signed-off-by: Philip Yang <Philip.Yang@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.c
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
drivers/gpu/drm/amd/amdkfd/kfd_priv.h
drivers/gpu/drm/amd/amdkfd/kfd_topology.c