drm/amdgpu: use sjt mec fw on gfx943 for sriov
Subsystems (2)
PATCH 1/1 drm/amdgpu: use sjt mec fw on gfx943 for sriov
Use second jump table in sriov for live migration or mulitple VF support so different VF can load different version of MEC as long as they support sjt
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +8 -2
@@ -45,6 +45,8 @@ MODULE_FIRMWARE("amdgpu/gc_9_4_3_mec.bin");MODULE_FIRMWARE ("amdgpu/gc_9_4_4_mec.bin" );MODULE_FIRMWARE ("amdgpu/gc_9_4_3_rlc.bin" );MODULE_FIRMWARE ("amdgpu/gc_9_4_4_rlc.bin" ); +MODULE_FIRMWARE ("amdgpu/gc_9_4_3_sjt_mec.bin" ); +MODULE_FIRMWARE ("amdgpu/gc_9_4_4_sjt_mec.bin" );#define GFX9_MEC_HPD_SIZE 4096#define RLCG_UCODE_LOADING_START_ADDRESS 0x00002000L
@@ -574,8 +576,12 @@ static int gfx_v9_4_3_init_cp_compute_microcode(struct amdgpu_device *adev, {int err; - err =amdgpu_ucode_request (adev, &adev->gfx.mec_fw, -"amdgpu/%s_mec.bin" , chip_name); +if (amdgpu_sriov_vf (adev)) + err =amdgpu_ucode_request (adev, &adev->gfx.mec_fw, +"amdgpu/%s_sjt_mec.bin" , chip_name); +else + err =amdgpu_ucode_request (adev, &adev->gfx.mec_fw, +"amdgpu/%s_mec.bin" , chip_name);if (err) goto out;amdgpu_gfx_cp_init_microcode (adev,AMDGPU_UCODE_ID_CP_MEC1 );
Signature · 1 line
2.34.1
[AMD Official Use Only - AMD Internal Distribution Only]
Ping. Please help review.
-----Original Message-----
From: Victor Zhao <[email protected]>
Sent: Saturday, November 23, 2024 9:59 PM
To: [email protected]
Cc: Zhao, Victor <[email protected]>
Subject: [PATCH] drm/amdgpu: use sjt mec fw on gfx943 for sriov
Use second jump table in sriov for live migration or mulitple VF support so different VF can load different version of MEC as long as they support sjt
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +2 -0
@@ -45,6 +45,8 @@ MODULE_FIRMWARE("amdgpu/gc_9_4_3_mec.bin");MODULE_FIRMWARE ("amdgpu/gc_9_4_4_mec.bin" );MODULE_FIRMWARE ("amdgpu/gc_9_4_3_rlc.bin" );MODULE_FIRMWARE ("amdgpu/gc_9_4_4_rlc.bin" ); +MODULE_FIRMWARE ("amdgpu/gc_9_4_3_sjt_mec.bin" ); +MODULE_FIRMWARE ("amdgpu/gc_9_4_4_sjt_mec.bin" );#define GFX9_MEC_HPD_SIZE 4096#define RLCG_UCODE_LOADING_START_ADDRESS 0x00002000L @@ -574,8 +576,12 @@ static int gfx_v9_4_3_init_cp_compute_microcode(struct amdgpu_device *adev, {
int err;
- err = amdgpu_ucode_request(adev, &adev->gfx.mec_fw,
- "amdgpu/%s_mec.bin", chip_name);
+ if (amdgpu_sriov_vf(adev))
+ err = amdgpu_ucode_request(adev, &adev->gfx.mec_fw,
+ "amdgpu/%s_sjt_mec.bin", chip_name);
+ else
+ err = amdgpu_ucode_request(adev, &adev->gfx.mec_fw,
+ "amdgpu/%s_mec.bin", chip_name);
if (err)
goto out;
amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_MEC1);--
2.34.1
Wang, Yang(Kevin)
Reviewed-by[AMD Official Use Only - AMD Internal Distribution Only]
Best Regards,
Kevin
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Zhao, Victor
Sent: Tuesday, November 26, 2024 17:56
To: Zhao, Victor <[email protected]>; [email protected]
Subject: RE: [PATCH] drm/amdgpu: use sjt mec fw on gfx943 for sriov
[AMD Official Use Only - AMD Internal Distribution Only]
[AMD Official Use Only - AMD Internal Distribution Only]
Ping. Please help review.
-----Original Message-----
From: Victor Zhao <[email protected]>
Sent: Saturday, November 23, 2024 9:59 PM
To: [email protected]
Cc: Zhao, Victor <[email protected]>
Subject: [PATCH] drm/amdgpu: use sjt mec fw on gfx943 for sriov
Use second jump table in sriov for live migration or mulitple VF support so different VF can load different version of MEC as long as they support sjt
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +2 -0
@@ -45,6 +45,8 @@ MODULE_FIRMWARE("amdgpu/gc_9_4_3_mec.bin");MODULE_FIRMWARE ("amdgpu/gc_9_4_4_mec.bin" );MODULE_FIRMWARE ("amdgpu/gc_9_4_3_rlc.bin" );MODULE_FIRMWARE ("amdgpu/gc_9_4_4_rlc.bin" ); +MODULE_FIRMWARE ("amdgpu/gc_9_4_3_sjt_mec.bin" ); +MODULE_FIRMWARE ("amdgpu/gc_9_4_4_sjt_mec.bin" );#define GFX9_MEC_HPD_SIZE 4096#define RLCG_UCODE_LOADING_START_ADDRESS 0x00002000L @@ -574,8 +576,12 @@ static int gfx_v9_4_3_init_cp_compute_microcode(struct amdgpu_device *adev, {
int err;
- err = amdgpu_ucode_request(adev, &adev->gfx.mec_fw,
- "amdgpu/%s_mec.bin", chip_name);
+ if (amdgpu_sriov_vf(adev))
+ err = amdgpu_ucode_request(adev, &adev->gfx.mec_fw,
+ "amdgpu/%s_sjt_mec.bin", chip_name);
+ else
+ err = amdgpu_ucode_request(adev, &adev->gfx.mec_fw,
+ "amdgpu/%s_mec.bin", chip_name);
if (err)
goto out;
amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_MEC1);--
2.34.1