]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdkfd: Retrieve SDMA numbers from amdgpu
authorAmber Lin <Amber.Lin@amd.com>
Thu, 18 Nov 2021 05:38:59 +0000 (00:38 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 22 Nov 2021 19:46:03 +0000 (14:46 -0500)
commitad1e28753baf5fd0995283d5d323a3c225bccaf6
treee1b81aa158561a9025c701f8e5039706fcde8623
parentd8c09ad89dfe7c5cee2b750b4bbecfe60f5aac28
drm/amdkfd: Retrieve SDMA numbers from amdgpu

Instead of hard coding the number of sdma engines and the number of
sdma_xgmi engines in the device_info table, get the number of toal SDMA
instances from amdgpu. The first two engines are sdma engines and the
rest are sdma-xgmi engines unless the ASIC doesn't support XGMI.

v2: add kfd_ prefix to non static function names

Signed-off-by: Amber Lin <Amber.Lin@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_device.c
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
drivers/gpu/drm/amd/amdkfd/kfd_priv.h
drivers/gpu/drm/amd/amdkfd/kfd_topology.c