drm/amdkfd: Move process doorbell allocation into kfd device
authorMukul Joshi <mukul.joshi@amd.com>
Fri, 18 Sep 2020 20:45:45 +0000 (16:45 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 22 Sep 2020 16:25:02 +0000 (12:25 -0400)
commit59d7115dae02c9eea9f44e5a0081e8a62a13b12c
tree40560dc7f46a9be95d176dd9cd183a9a6e11fb76
parentb7b6c38529c9ea8ebab287d84f27fca2472a5737
drm/amdkfd: Move process doorbell allocation into kfd device

Move doorbell allocation for a process into kfd device and
allocate doorbell space in each PDD during process creation.
Currently, KFD manages its own doorbell space but for some
devices, amdgpu would allocate the complete doorbell
space instead of leaving a chunk of doorbell space for KFD to
manage. In a system with mix of such devices, KFD would need
to request process doorbell space based on the type of device,
either from amdgpu or from its own doorbell space.

Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
drivers/gpu/drm/amd/amdkfd/kfd_device.c
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c
drivers/gpu/drm/amd/amdkfd/kfd_priv.h
drivers/gpu/drm/amd/amdkfd/kfd_process.c