drm/amd/amdgpu: Enable IMU_I/DRAM FW_LOAD CMD
Subsystems (2)
PATCH 1/1 drm/amd/amdgpu: Enable IMU_I/DRAM FW_LOAD CMD
For GC 11, Eventhough IMU ucode load from BIOS/IFWI, PSP exepct Load command from GFX to load IMU ucode.
--- 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(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +7 -2
@@ -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 ; + } if (psp->autoload_supported && (amdgpu_ip_version(adev, MP0_HWIP, 0) ==
drivers/gpu/drm/amd/amdgpu/imu_v11_0.c +13 -1
@@ -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;
Signature · 1 line
2.43.0
Quoted 15 lines · Suresh Guttula
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(-)drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +0
-0@@ -4091,8 +4091,13 @@ static int psp_load_non_psp_fw(struct psp_context *psp)continue ;
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c static int psp_load_non_psp_fw(struct psp_context *psp) · line 4099
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +6
-2} -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
Quoted 37 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1
-0+ } if (psp->autoload_supported && (amdgpu_ip_version(adev, MP0_HWIP, 0) ==drivers/gpu/drm/amd/amdgpu/imu_v11_0.c +13
-1@@ -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;
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
Quoted 16 lines · Suresh Guttula
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(-)drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +0
-0@@ -4091,8 +4091,13 @@ static int psp_load_non_psp_fw(struct psp_context *psp)continue ;
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c static int psp_load_non_psp_fw(struct psp_context *psp) · line 4099
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +6
-2} -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.
Quoted 38 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1
-0+ } if (psp->autoload_supported && (amdgpu_ip_version(adev, MP0_HWIP, 0) == diff --git
a/drivers/gpu/drm/amd/amdgpu/imu_v11_0.cb/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c
indexb6c4ae35ca03..3aef68c9891a100644drivers/gpu/drm/amd/amdgpu/imu_v11_0.c +13
-1@@ -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;
Quoted 40 lines · Suresh
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/DRAMFW_LOADCMDQuoted 16 lines · Suresh Guttula
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(-)drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +0
-0@@ -4091,8 +4091,13 @@ static int psp_load_non_psp_fw(struct psp_context *psp)continue ;drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c static int psp_load_non_psp_fw(struct psp_context *psp) · line 4099
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +6
-2} -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.
Quoted 4 lines
Thanks,
LijoThis is specific to APUs, Let me add APU check also.. Like added in
imuv11_init_microcode(), that will differentiate.
If it's applicable for all APUs including any upcoming ones, then the commit message shouldn't specify "For GC v11".
Thanks,
Lijo
Quoted 41 lines
Thanks.
Quoted 38 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1
-0+ } if (psp->autoload_supported && (amdgpu_ip_version(adev, MP0_HWIP, 0) == diff --git
a/drivers/gpu/drm/amd/amdgpu/imu_v11_0.cb/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c
indexb6c4ae35ca03..3aef68c9891a100644drivers/gpu/drm/amd/amdgpu/imu_v11_0.c +13
-1@@ -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;
AMD General
-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: 18 November 2026 19:26
To: Guttula, Suresh <[email protected]>; Deucher, Alexander <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amd/amdgpu: Enable IMU_I/DRAM FW_LOAD CMD
Quoted 41 lines · Suresh
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/DRAMFW_LOADCMDQuoted 16 lines · Suresh Guttula
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(-)drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +0
-0@@ -4091,8 +4091,13 @@ static int psp_load_non_psp_fw(struct psp_context *psp)continue ;drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c static int psp_load_non_psp_fw(struct psp_context *psp) · line 4099
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +6
-2} -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.
Quoted 4 lines
Thanks,
LijoThis is specific to APUs, Let me add APU check also.. Like added in
imuv11_init_microcode(), that will differentiate.
If it's applicable for all APUs including any upcoming ones, then the commit message shouldn't specify "For GC v11".
Thanks,
Lijo
As of now, this is specific to GC11 only.. I will update.
Quoted 41 lines
Thanks.
Quoted 38 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1
-1+ } 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
indexb6c4ae35ca03..3aef68c9891a100644drivers/gpu/drm/amd/amdgpu/imu_v11_0.c +13
-1@@ -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;