[PATCH] drm/amdgpu: Use MEC FW with SJT on gfx_v9_4_3

Feng, Yuan Yuan.Feng at amd.com
Fri Dec 6 06:15:03 UTC 2024


[AMD Official Use Only - AMD Internal Distribution Only]

Hey @Lazar, Lijo,

Yes, Just pinged Victor, Zhao. Sure, I will make a change accordingly.

Thanks,
Yuan

-----Original Message-----
From: Lazar, Lijo <Lijo.Lazar at amd.com>
Sent: Friday, December 6, 2024 12:18 AM
To: Feng, Yuan <Yuan.Feng at amd.com>; amd-gfx at lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu: Use MEC FW with SJT on gfx_v9_4_3



On 12/6/2024 4:15 AM, Yuan Feng wrote:
> On SRIOV, guest driver and host driver might deploy different versions
> of MEC firmware binaries that lead to potential compability issues
> cause system hang. To solve this, host and guest deploy MEC fw copies with two level jump table.
>
> Signed-off-by: Yuan Feng <yfeng1 at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
> index 03654bfda58a..f248449e93a7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
> @@ -45,6 +45,7 @@ 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");
>

This change needs to be done on top of
https://patchwork.freedesktop.org/patch/626097/ as that one adds support for GFX 9.4.4 also.

Thanks,
Lijo

>  #define GFX9_MEC_HPD_SIZE 4096
>  #define RLCG_UCODE_LOADING_START_ADDRESS 0x00002000L @@ -574,7
> +575,16 @@ 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,
> +     if (amdgpu_sriov_vf(adev)) {
> +             err = amdgpu_ucode_request(adev, &adev->gfx.mec_fw,
> +                                "amdgpu/%s_sjt_mec.bin", chip_name);
> +
> +             if (err)
> +                     err = amdgpu_ucode_request(adev, &adev->gfx.mec_fw,
> +                                             "amdgpu/%s_mec.bin", chip_name);
> +     }
> +     else
> +             err = amdgpu_ucode_request(adev, &adev->gfx.mec_fw,
>                                  "amdgpu/%s_mec.bin", chip_name);
>       if (err)
>               goto out;



More information about the amd-gfx mailing list