AMD General Reviewed-by: Hawking Zhang <[email protected]>
Regards, Hawking -----Original Message----- From: Sun, Ce(Overlord) <[email protected]> Sent: Saturday, October 10, 2026 11:10 PM To: [email protected] Cc: Zhang, Hawking <[email protected]>; Chai, Thomas <[email protected]>; Zhou1, Tao <[email protected]>; Yang, Stanley <[email protected]>; Sun, Ce(Overlord) <[email protected]> Subject: [PATCH] drm/amd/pm: move smu_feature_init to smu_early_init RAS early init executes prior to smu_sw_init, leaving feature_num as 0 and triggering invalid bitmap operations. Signed-off-by: Ce Sun <[email protected]> --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c index 44b2e8d8b956..9e9c1621b21e 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c @@ -884,6 +884,9 @@ static int smu_early_init(struct amdgpu_ip_block *ip_block) r = smu_set_funcs(adev); if (r) return r; + + smu_feature_init(smu, SMU_FEATURE_NUM_DEFAULT); + return smu_init_microcode(smu); } @@ -1417,7 +1420,6 @@ static int smu_sw_init(struct amdgpu_ip_block *ip_block) int i, ret; smu->pool_size = adev->pm.smu_prv_buffer_size; - smu_feature_init(smu, SMU_FEATURE_NUM_DEFAULT); INIT_WORK(&smu->throttling_logging_work, smu_throttling_logging_work_fn); INIT_WORK(&smu->interrupt_work, smu_interrupt_work_fn); -- 2.34.1
