drm/amdkfd: Fix SDMA in CPX mode
authorMukul Joshi <mukul.joshi@amd.com>
Tue, 31 May 2022 20:25:16 +0000 (16:25 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 13:44:13 +0000 (09:44 -0400)
commit643e40d4c06f8c887af1789c7bf8d279e9c8e4cf
treed6694027e0b64e1e38e3e4e409bd647e0a9d9893
parent92085240ef9c0ec60c27a60b3cc0d4f5266fa511
drm/amdkfd: Fix SDMA in CPX mode

When creating a user-mode SDMA queue, CP FW expects
driver to use/set virtual SDMA engine id in MAP_QUEUES
packet instead of using the physical SDMA engine id.
Each partition node's virtual SDMA number should start
from 0. However, when allocating doorbell for the queue,
KFD needs to allocate the doorbell from doorbell space
corresponding to the physical SDMA engine id, otherwise
the hwardware will not see the doorbell press.

Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Amber Lin <Amber.Lin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c