AMD General -----Original Message----- From: Lazar, Lijo <[email protected]> Sent: 18 November 2026 19:14 To: Guttula, Suresh <[email protected]>; Deucher, Alexander <[email protected]>; [email protected] Subject: Re: [PATCH] drm/amd/amdgpu: Enable IMU_I/DRAM FW_LOAD CMD
On 18-Nov-26 6:53 PM, Suresh Guttula wrote: > For GC 11, Eventhough IMU ucode load from BIOS/IFWI, PSP exepct Load > command from GFX to load IMU ucode. > > Signed-off-by: Suresh Guttula <[email protected]> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 9 +++++++-- > drivers/gpu/drm/amd/amdgpu/imu_v11_0.c | 14 +++++++++++++- > 2 files changed, 20 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c > index 7a8cc043df5e..9d6c192db348 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c > @@ -4091,8 +4091,13 @@ static int psp_load_non_psp_fw(struct psp_context *psp) > continue; > } > > - if (fw_load_skip_check(psp, ucode)) > - continue; > + if (fw_load_skip_check(psp, ucode)) { > + if (!ucode->fw && (ucode->ucode_id == > AMDGPU_UCODE_ID_IMU_I || > + ucode->ucode_id == AMDGPU_UCODE_ID_IMU_D)) > + dev_dbg(psp->adev->dev, "don't skip IMU fw > load!\n"); > + else > + continue; Keeping this in common code causes side effect on other SOCs. Better add a check inside fw_load_skip_check() such that it returns false for the particular GC IP version. Thanks, Lijo This is specific to APUs, Let me add APU check also.. Like added in imuv11_init_microcode(), that will differentiate. Thanks. > + } > > if (psp->autoload_supported && > (amdgpu_ip_version(adev, MP0_HWIP, 0) == diff --git > a/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c > b/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c > index b6c4ae35ca03..3aef68c9891a 100644 > --- a/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c > @@ -31,6 +31,8 @@ > #include "gc/gc_11_0_0_offset.h" > #include "gc/gc_11_0_0_sh_mask.h" > > +#define IMU_DATA_SIZE_BYTES 66304 > + > MODULE_FIRMWARE("amdgpu/gc_11_0_0_imu.bin"); > MODULE_FIRMWARE("amdgpu/gc_11_0_0_imu_kicker.bin"); > MODULE_FIRMWARE("amdgpu/gc_11_0_1_imu.bin"); > @@ -73,8 +75,18 @@ static int imu_v11_0_init_microcode(struct amdgpu_device > *adev) > else > err = amdgpu_ucode_request(adev, &adev->gfx.imu_fw, required, > "amdgpu/%s_imu.bin", ucode_prefix); > - if (err == -ENODEV && imu_in_ifwi) > + if (err == -ENODEV && imu_in_ifwi) { > + info = &adev->firmware.ucode[AMDGPU_UCODE_ID_IMU_I]; > + info->ucode_id = AMDGPU_UCODE_ID_IMU_I; > + info->fw = adev->gfx.imu_fw; > + info->ucode_size = IMU_DATA_SIZE_BYTES; > + > + info = &adev->firmware.ucode[AMDGPU_UCODE_ID_IMU_D]; > + info->ucode_id = AMDGPU_UCODE_ID_IMU_D; > + info->fw = adev->gfx.imu_fw; > + info->ucode_size = IMU_DATA_SIZE_BYTES; > return 0; > + } > if (err) > goto out; >
