From: Likun Gao <[email protected]> Fix some code error for muti-xcc on mes v12_1.
Signed-off-by: Likun Gao <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]> --- 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 dcef628d604c5..128e29e6546bc 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); @@ -684,7 +685,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] = @@ -1684,7 +1685,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.51.1
