From a5192fbb2ee4225122efdfcaea53d50e9f477055 Mon Sep 17 00:00:00 2001 From: Likun Gao Date: Fri, 18 Apr 2025 11:11:24 +0800 Subject: [PATCH] drm/amdgpu: fix mes code error for muti-xcc Fix some code error for muti-xcc on mes v12_1. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/mes_v12_1.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v12_1.c b/drivers/gpu/drm/amd/amdgpu/mes_v12_1.c index 06c5b923957bf..02200747446f1 100644 --- a/drivers/gpu/drm/amd/amdgpu/mes_v12_1.c +++ b/drivers/gpu/drm/amd/amdgpu/mes_v12_1.c @@ -37,6 +37,7 @@ MODULE_FIRMWARE("amdgpu/gc_12_1_0_mes1.bin"); MODULE_FIRMWARE("amdgpu/gc_12_1_0_uni_mes.bin"); static int mes_v12_1_hw_init(struct amdgpu_ip_block *ip_block); +static int mes_v12_1_xcc_hw_init(struct amdgpu_ip_block *ip_block, int xcc_id); static int mes_v12_1_hw_fini(struct amdgpu_ip_block *ip_block); static int mes_v12_1_kiq_hw_init(struct amdgpu_device *adev, uint32_t xcc_id); static int mes_v12_1_kiq_hw_fini(struct amdgpu_device *adev, uint32_t xcc_id); @@ -683,7 +684,7 @@ static int mes_v12_1_set_hw_resources(struct amdgpu_mes *mes, for (i = 0; i < 5; i++) { mes_set_hw_res_pkt.gc_base[i] = - adev->reg_offset[GC_HWIP][GET_INST(GC, xcc_id)][i]; + adev->reg_offset[GC_HWIP][0][i]; mes_set_hw_res_pkt.mmhub_base[i] = adev->reg_offset[MMHUB_HWIP][0][i]; mes_set_hw_res_pkt.osssys_base[i] = @@ -1683,7 +1684,7 @@ static int mes_v12_1_kiq_hw_init(struct amdgpu_device *adev, uint32_t xcc_id) } if (adev->mes.enable_legacy_queue_map) { - r = mes_v12_1_hw_init(ip_block); + r = mes_v12_1_xcc_hw_init(ip_block, xcc_id); if (r) goto failure; } -- 2.47.3