summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorHawking Zhang <Hawking.Zhang@amd.com>2025-06-12 21:52:19 +0800
committerAlex Deucher <alexander.deucher@amd.com>2026-01-05 16:59:55 -0500
commite7820045fde15d25b5b2706f03499e0cb9ae778e (patch)
tree18b51817eb3021537f223d11724645100f7a4f29 /drivers/gpu
parent2d70a10dd16a5baa3e977c12311d9d8aa2d13819 (diff)
drm/amdgpu: Init mcm_addr look up table
Encode mcm address look up table in SPX mode as a temp solution. v2: fill in when interface is ready (Alex) Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Likun Gao <Likun.Gao@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_imu.h1
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c5
-rw-r--r--drivers/gpu/drm/amd/amdgpu/imu_v12_1.c6
3 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_imu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_imu.h
index eb8537558f5f..9c56be725ff3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_imu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_imu.h
@@ -39,6 +39,7 @@ struct amdgpu_imu_funcs {
int (*switch_compute_partition)(struct amdgpu_device *adev,
int num_xccs_per_xcp,
int compute_partition_mode);
+ void (*init_mcm_addr_lut)(struct amdgpu_device *adev);
};
struct imu_rlc_ram_golden {
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
index 1f567bd6cc46..a904edc2869c 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
@@ -2666,6 +2666,11 @@ 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/imu_v12_1.c b/drivers/gpu/drm/amd/amdgpu/imu_v12_1.c
index 8e33ffcdfa4c..539785a51f69 100644
--- a/drivers/gpu/drm/amd/amdgpu/imu_v12_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/imu_v12_1.c
@@ -153,8 +153,14 @@ static int imu_v12_1_switch_compute_partition(struct amdgpu_device *adev,
return 0;
}
+static void imu_v12_1_init_mcm_addr_lut(struct amdgpu_device *adev)
+{
+ /* todo: fill in when interface is ready */
+}
+
const struct amdgpu_imu_funcs gfx_v12_1_imu_funcs = {
.init_microcode = imu_v12_1_init_microcode,
.load_microcode = imu_v12_1_load_microcode,
.switch_compute_partition = imu_v12_1_switch_compute_partition,
+ .init_mcm_addr_lut = imu_v12_1_init_mcm_addr_lut,
};