Skip to contentSkip to conversation

drm/amdgpu: Fix for MEC SJT FW Load Fail on VF

PATCH In review Yuan Feng 2 participants 2 messages Dec 27, 2024

Subsystems (2)
lore
Share & tools
lore

Yuan Feng

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Fix for MEC SJT FW Load Fail on VF

From: yfeng1 <[email protected]>

Users might switch to ROCM build does not include MEC SJT FW and driver needs to consider this case.w

Change-Id I6803818450bcfcc9d912c80ad351824be7a9694c
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +7 -2
index a5bdcaf7a081..2ba185875baa 100644
@@ -579,11 +579,16 @@ static int gfx_v9_4_3_init_cp_compute_microcode(struct amdgpu_device *adev,
 {
 	int err;
 
-	if (amdgpu_sriov_vf(adev))
+	if (amdgpu_sriov_vf(adev)) {
 		err = amdgpu_ucode_request(adev, &adev->gfx.mec_fw,
 					   AMDGPU_UCODE_REQUIRED,
 					   "amdgpu/%s_sjt_mec.bin", chip_name);
-	else
+
+		if (err)
+			err = amdgpu_ucode_request(adev, &adev->gfx.mec_fw,
+							AMDGPU_UCODE_REQUIRED,
+							"amdgpu/%s_mec.bin", chip_name);
+	} else
 		err = amdgpu_ucode_request(adev, &adev->gfx.mec_fw,
 					   AMDGPU_UCODE_REQUIRED,
 					   "amdgpu/%s_mec.bin", chip_name);
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Regards,
Hawking
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Yuan Feng
Sent: Friday, December 27, 2024 12:44
To: [email protected]
Cc: Feng, Yuan <[email protected]>
Subject: [PATCH] drm/amdgpu: Fix for MEC SJT FW Load Fail on VF

From: yfeng1 <[email protected]>

Users might switch to ROCM build does not include MEC SJT FW and driver needs to consider this case.w

Change-Id I6803818450bcfcc9d912c80ad351824be7a9694c
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +7 -3
index a5bdcaf7a081..2ba185875baa 100644
@@ -579,11 +579,16 @@ static int gfx_v9_4_3_init_cp_compute_microcode(struct amdgpu_device *adev,  {
        int err;
 
-       if (amdgpu_sriov_vf(adev))
+       if (amdgpu_sriov_vf(adev)) {
                err = amdgpu_ucode_request(adev, &adev->gfx.mec_fw,
                                           AMDGPU_UCODE_REQUIRED,
                                           "amdgpu/%s_sjt_mec.bin", chip_name);
-       else
+
+               if (err)
+                       err = amdgpu_ucode_request(adev, &adev->gfx.mec_fw,
+                                                       AMDGPU_UCODE_REQUIRED,
+                                                       "amdgpu/%s_mec.bin", chip_name);
+       } else
                err = amdgpu_ucode_request(adev, &adev->gfx.mec_fw,
                                           AMDGPU_UCODE_REQUIRED,
                                           "amdgpu/%s_mec.bin", chip_name);
--

2.34.1