[PATCH 07/23] drm/amdkfd: Fix SDMA+HIQ HQD allocation on GFX9.4.3

Alex Deucher alexander.deucher at amd.com
Thu Mar 30 19:42:18 UTC 2023


From: Mukul Joshi <mukul.joshi at amd.com>

The calculation for allocating the SDMA+HIQ HQDs was updated
incorrectly when support for GFX 9.4.3 was added. This causes
kernel crash logs when allocating SDMA HQDs.

Fixes: bb3dcef654a8 ("drm/amdkfd: Update MQD management on multi XCC setup")
Signed-off-by: Mukul Joshi <mukul.joshi at amd.com>
Reviewed-by: Amber Lin <Amber.Lin at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
index 1d53cbc55253..a0520569d00c 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
@@ -2291,7 +2291,7 @@ static int allocate_hiq_sdma_mqd(struct device_queue_manager *dqm)
 	uint32_t size = dqm->mqd_mgrs[KFD_MQD_TYPE_SDMA]->mqd_size *
 		get_num_all_sdma_engines(dqm) *
 		dev->kfd->device_info.num_sdma_queues_per_engine +
-		(dqm->mqd_mgrs[KFD_MQD_TYPE_HIQ]->mqd_size +
+		(dqm->mqd_mgrs[KFD_MQD_TYPE_HIQ]->mqd_size *
 		dqm->dev->num_xcc_per_node);
 
 	retval = amdgpu_amdkfd_alloc_gtt_mem(dev->adev, size,
-- 
2.39.2



More information about the amd-gfx mailing list