From: Likun Gao <[email protected]>

Add support to load rlc firmware for rev_id 0 of gfx v12_1.

Signed-off-by: Likun Gao <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c 
b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
index 68fd3c04134d8..3bef36f5a487e 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
@@ -61,7 +61,7 @@
 #define regCP_HQD_IB_CONTROL_DEFAULT                                           
   0x00100000
 
 MODULE_FIRMWARE("amdgpu/gc_12_1_0_mec.bin");
-MODULE_FIRMWARE("amdgpu/gc_12_1_0_rlc.bin");
+MODULE_FIRMWARE("amdgpu/gc_12_1_0_rlc_1.bin");
 
 #define SH_MEM_ALIGNMENT_MODE_UNALIGNED_GFX12_1_0      0x00000001
 #define DEFAULT_SH_MEM_CONFIG \
@@ -409,7 +409,13 @@ static int gfx_v12_1_init_microcode(struct amdgpu_device 
*adev)
        amdgpu_ucode_ip_version_decode(adev, GC_HWIP, ucode_prefix, 
sizeof(ucode_prefix));
 
        if (!amdgpu_sriov_vf(adev)) {
-               err = amdgpu_ucode_request(adev, &adev->gfx.rlc_fw,
+               if (amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(12, 1, 0) 
&&
+                   adev->rev_id == 0)
+                       err = amdgpu_ucode_request(adev, &adev->gfx.rlc_fw,
+                                          AMDGPU_UCODE_REQUIRED,
+                                          "amdgpu/%s_rlc_1.bin", ucode_prefix);
+               else
+                       err = amdgpu_ucode_request(adev, &adev->gfx.rlc_fw,
                                           AMDGPU_UCODE_REQUIRED,
                                           "amdgpu/%s_rlc.bin", ucode_prefix);
                if (err)
-- 
2.53.0

Reply via email to