summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorLikun Gao <Likun.Gao@amd.com>2025-08-18 15:29:07 +0800
committerAlex Deucher <alexander.deucher@amd.com>2026-01-05 16:59:55 -0500
commit60481d95ad989f556da15fa40bc6edb648324b02 (patch)
treeec9610526dfcd73f712f4431facad7d99fef857b /drivers/gpu/drm/amd/amdgpu
parente7820045fde15d25b5b2706f03499e0cb9ae778e (diff)
drm/amdgpu: update mcm_addr_lut data for imu v12_1
Support for partition mode to program MCM_ADDR_LUT. v2: clean up (Alex) Signed-off-by: Likun Gao <Likun.Gao@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c5
-rw-r--r--drivers/gpu/drm/amd/amdgpu/soc_v1_0.c11
2 files changed, 9 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
index a904edc2869c..1f567bd6cc46 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
@@ -2666,11 +2666,6 @@ static void gfx_v12_1_init_golden_registers(struct amdgpu_device *adev)
gfx_v12_1_xcc_enable_atomics(adev, i);
gfx_v12_1_xcc_setup_tcp_thrashing_ctrl(adev, i);
}
-
- if (adev->gfx.imu.funcs &&
- adev->gfx.imu.funcs->init_mcm_addr_lut &&
- amdgpu_emu_mode)
- adev->gfx.imu.funcs->init_mcm_addr_lut(adev);
}
static int gfx_v12_1_hw_init(struct amdgpu_ip_block *ip_block)
diff --git a/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c b/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c
index baa353ee7d1c..628abd25ac09 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c
@@ -658,8 +658,15 @@ static int soc_v1_0_switch_partition_mode(struct amdgpu_xcp_mgr *xcp_mgr,
num_xcc_per_xcp = __soc_v1_0_get_xcc_per_xcp(xcp_mgr, mode);
if (adev->gfx.imu.funcs &&
- adev->gfx.imu.funcs->switch_compute_partition)
- adev->gfx.imu.funcs->switch_compute_partition(xcp_mgr->adev, num_xcc_per_xcp, mode);
+ adev->gfx.imu.funcs->switch_compute_partition) {
+ ret = adev->gfx.imu.funcs->switch_compute_partition(xcp_mgr->adev, num_xcc_per_xcp, mode);
+ if (ret)
+ goto out;
+ }
+ if (adev->gfx.imu.funcs &&
+ adev->gfx.imu.funcs->init_mcm_addr_lut &&
+ amdgpu_emu_mode)
+ adev->gfx.imu.funcs->init_mcm_addr_lut(adev);
/* Init info about new xcps */
*num_xcps = num_xcc / num_xcc_per_xcp;