Skip to contentSkip to conversation

drm/amdgpu: skip IMU microcode request for GC 12.1

PATCH In review Horatio Zhang 2 participants 2 messages Aug 31

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/amdgpu: skip IMU microcode request for GC 12.1

vBIOS has the support of IMU firmware. Requesting it now fails and aborts GPU init:

amdgpu 0001:01:00.0: early_init of IP block <gfx_v12_1> failed -19 amdgpu 0001:01:00.0: Fatal error during GPU init

v2: drop the MODULE_FIRMWARE declaration.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c | 3 ++-
 drivers/gpu/drm/amd/amdgpu/imu_v12_1.c | 2 --
 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c +2 -1
index 1188e91c66ec..3273be640600 100644
@@ -582,7 +582,8 @@ static int gfx_v12_1_init_microcode(struct amdgpu_device *adev)
 	adev->gfx.mec2_fw = NULL;
 
 	if (adev->gfx.imu.funcs) {
-		if (adev->gfx.imu.funcs->init_microcode) {
+		if (adev->gfx.imu.funcs->init_microcode &&
+		    adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) {
 			err = adev->gfx.imu.funcs->init_microcode(adev);
 			if (err)
 				dev_err(adev->dev, "Failed to load imu firmware!\n");
drivers/gpu/drm/amd/amdgpu/imu_v12_1.c +0 -2
index a124abe44724..33fe0a127c50 100644
@@ -32,8 +32,6 @@
 #include "gc/gc_12_1_0_sh_mask.h"
 #include "mmhub/mmhub_4_2_0_offset.h"
 
-MODULE_FIRMWARE("amdgpu/gc_12_1_0_imu.bin");
-
 #define TRANSFER_RAM_MASK	0x001c0000
 
 static int imu_v12_1_init_microcode(struct amdgpu_device *adev)
Signature · 1 line
2.43.0
Reviewed-by on v2 1/1
#1 lore raw
Quoted 10 lines · Horatio Zhang

vBIOS has the support of IMU firmware. Requesting it now fails and aborts GPU init:

amdgpu 0001:01:00.0: early_init of IP block <gfx_v12_1> failed -19 amdgpu 0001:01:00.0: Fatal error during GPU init

v2: drop the MODULE_FIRMWARE declaration.

Thanks,
Lijo

Quoted 32 lines
---
  drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c | 3 ++-
  drivers/gpu/drm/amd/amdgpu/imu_v12_1.c | 2 --
  2 files changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c +2 -1
index 1188e91c66ec..3273be640600 100644
@@ -582,7 +582,8 @@ static int gfx_v12_1_init_microcode(struct amdgpu_device *adev)
  	adev->gfx.mec2_fw = NULL;
 
  	if (adev->gfx.imu.funcs) {
-		if (adev->gfx.imu.funcs->init_microcode) {
+		if (adev->gfx.imu.funcs->init_microcode &&
+		    adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) {
  			err = adev->gfx.imu.funcs->init_microcode(adev);
  			if (err)
  				dev_err(adev->dev, "Failed to load imu firmware!\n");
drivers/gpu/drm/amd/amdgpu/imu_v12_1.c +0 -2
index a124abe44724..33fe0a127c50 100644
@@ -32,8 +32,6 @@
  #include "gc/gc_12_1_0_sh_mask.h"
  #include "mmhub/mmhub_4_2_0_offset.h"
 
-MODULE_FIRMWARE("amdgpu/gc_12_1_0_imu.bin");
-
  #define TRANSFER_RAM_MASK	0x001c0000
 
  static int imu_v12_1_init_microcode(struct amdgpu_device *adev)