All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: bypass IMU ucode loading for GC 11 APU
@ 2026-11-11 15:46 Suresh Guttula
  2026-11-11 16:33 ` Mario Limonciello
  0 siblings, 1 reply; 2+ messages in thread
From: Suresh Guttula @ 2026-11-11 15:46 UTC (permalink / raw)
  To: Alexander.Deucher, amd-gfx; +Cc: suresh.guttula

For GC 11,IMU ucode is part of IFWI and ASP would load it by default.

Signed-off-by: Suresh Guttula <suresh.guttula@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/imu_v11_0.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c b/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c
index 09dc01a425d1..e2b3f46bbc64 100644
--- a/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c
@@ -52,16 +52,25 @@ static int imu_v11_0_init_microcode(struct amdgpu_device *adev)
 	int err;
 	const struct imu_firmware_header_v1_0 *imu_hdr;
 	struct amdgpu_firmware_info *info = NULL;
+	bool imu_in_ifwi;
+	enum amdgpu_ucode_required required;
 
 	DRM_DEBUG("\n");
 
+	/* On GFX 11 APUs, ASP loads the IFWI IMU ucode by default. */
+	imu_in_ifwi = adev->firmware.load_type == AMDGPU_FW_LOAD_PSP &&
+		      (adev->flags & AMD_IS_APU);
+	required = imu_in_ifwi ? AMDGPU_UCODE_OPTIONAL : AMDGPU_UCODE_REQUIRED;
+
 	amdgpu_ucode_ip_version_decode(adev, GC_HWIP, ucode_prefix, sizeof(ucode_prefix));
 	if (amdgpu_is_kicker_fw(adev))
-		err = amdgpu_ucode_request(adev, &adev->gfx.imu_fw, AMDGPU_UCODE_REQUIRED,
+		err = amdgpu_ucode_request(adev, &adev->gfx.imu_fw, required,
 					   "amdgpu/%s_imu_kicker.bin", ucode_prefix);
 	else
-		err = amdgpu_ucode_request(adev, &adev->gfx.imu_fw, AMDGPU_UCODE_REQUIRED,
+		err = amdgpu_ucode_request(adev, &adev->gfx.imu_fw, required,
 					   "amdgpu/%s_imu.bin", ucode_prefix);
+	if (err == -ENODEV && imu_in_ifwi)
+		return 0;
 	if (err)
 		goto out;
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/amdgpu: bypass IMU ucode loading for GC 11 APU
  2026-11-11 15:46 [PATCH] drm/amdgpu: bypass IMU ucode loading for GC 11 APU Suresh Guttula
@ 2026-11-11 16:33 ` Mario Limonciello
  0 siblings, 0 replies; 2+ messages in thread
From: Mario Limonciello @ 2026-11-11 16:33 UTC (permalink / raw)
  To: Suresh Guttula, Alexander.Deucher, amd-gfx



On 11/11/26 09:46, Suresh Guttula wrote:
> For GC 11,IMU ucode is part of IFWI and ASP would load it by default.
> 
> Signed-off-by: Suresh Guttula <suresh.guttula@amd.com>

Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Tested-by: Mario Limonciello (AMD) <superm1@kernel.org> # gfx1170, gfx1103

> ---
>   drivers/gpu/drm/amd/amdgpu/imu_v11_0.c | 13 +++++++++++--
>   1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c b/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c
> index 09dc01a425d1..e2b3f46bbc64 100644
> --- a/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c
> @@ -52,16 +52,25 @@ static int imu_v11_0_init_microcode(struct amdgpu_device *adev)
>   	int err;
>   	const struct imu_firmware_header_v1_0 *imu_hdr;
>   	struct amdgpu_firmware_info *info = NULL;
> +	bool imu_in_ifwi;
> +	enum amdgpu_ucode_required required;
>   
>   	DRM_DEBUG("\n");
>   
> +	/* On GFX 11 APUs, ASP loads the IFWI IMU ucode by default. */
> +	imu_in_ifwi = adev->firmware.load_type == AMDGPU_FW_LOAD_PSP &&
> +		      (adev->flags & AMD_IS_APU);
> +	required = imu_in_ifwi ? AMDGPU_UCODE_OPTIONAL : AMDGPU_UCODE_REQUIRED;
> +
>   	amdgpu_ucode_ip_version_decode(adev, GC_HWIP, ucode_prefix, sizeof(ucode_prefix));
>   	if (amdgpu_is_kicker_fw(adev))
> -		err = amdgpu_ucode_request(adev, &adev->gfx.imu_fw, AMDGPU_UCODE_REQUIRED,
> +		err = amdgpu_ucode_request(adev, &adev->gfx.imu_fw, required,
>   					   "amdgpu/%s_imu_kicker.bin", ucode_prefix);
>   	else
> -		err = amdgpu_ucode_request(adev, &adev->gfx.imu_fw, AMDGPU_UCODE_REQUIRED,
> +		err = amdgpu_ucode_request(adev, &adev->gfx.imu_fw, required,
>   					   "amdgpu/%s_imu.bin", ucode_prefix);
> +	if (err == -ENODEV && imu_in_ifwi)
> +		return 0;
>   	if (err)
>   		goto out;
>   


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-11 16:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-11 15:46 [PATCH] drm/amdgpu: bypass IMU ucode loading for GC 11 APU Suresh Guttula
2026-11-11 16:33 ` Mario Limonciello

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.