drm/amdgpu: use doorbell mgr for kfd kernel doorbells
authorShashank Sharma <shashank.sharma@amd.com>
Fri, 14 Jul 2023 13:31:20 +0000 (15:31 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Aug 2023 21:14:07 +0000 (17:14 -0400)
commitc31866651086fc3ae6ff7ea0aab6b11edc7b7a93
treeda1390293362f8f3984f41eb18bea450d479c436
parent76bd34786ebd323cf4c32604cf6166b08aaa3ffa
drm/amdgpu: use doorbell mgr for kfd kernel doorbells

This patch:
- adds a doorbell bo in kfd device structure.
- creates doorbell page for kfd kernel usages.
- updates the get_kernel_doorbell and free_kernel_doorbell functions
  accordingly

V2: Do not use wrapper API, use direct amdgpu_create_kernel(Alex)
V3:
 - Move single variable declaration below (Christian)
 - Add a to-do item to reuse the KGD kernel level doorbells for
   KFD for non-MES cases, instead of reserving one page (Felix)

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Shashank Sharma <shashank.sharma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device.c
drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c
drivers/gpu/drm/amd/amdkfd/kfd_priv.h