drm/amdkfd: helper to convert gpu id and idx
authorAlex Sierra <alex.sierra@amd.com>
Wed, 8 Apr 2020 04:08:45 +0000 (23:08 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 21 Apr 2021 01:46:07 +0000 (21:46 -0400)
commit2aeb742b72121c539cfc9cff8c00c5ca32ba4b1c
tree8ec05873165dff13b993b951f5ffff69f6777596
parentcccbeb6209bddee35539d9353de9fd775ce9bb55
drm/amdkfd: helper to convert gpu id and idx

svm range uses gpu bitmap to store which GPU svm range maps to.
Application pass driver gpu id to specify GPU, the helper is needed to
convert gpu id to gpu bitmap idx.

Access through kfd_process_device pointers array from kfd_process.

Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_priv.h
drivers/gpu/drm/amd/amdkfd/kfd_process.c