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.

Signed-off-by: Horatio Zhang <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
---
 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(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c 
b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
index 1188e91c66ec..3273be640600 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
@@ -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");
diff --git a/drivers/gpu/drm/amd/amdgpu/imu_v12_1.c 
b/drivers/gpu/drm/amd/amdgpu/imu_v12_1.c
index a124abe44724..33fe0a127c50 100644
--- a/drivers/gpu/drm/amd/amdgpu/imu_v12_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/imu_v12_1.c
@@ -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)
-- 
2.43.0

Reply via email to