[AMD Official Use Only - AMD Internal Distribution Only]

-----Original Message-----
From: Huang, Tim <tim.hu...@amd.com>
Sent: Thursday, February 20, 2025 4:55 PM
To: Zhang, Jesse(Jie) <jesse.zh...@amd.com>; amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander <alexander.deuc...@amd.com>; Zhu, Jiadong 
<jiadong....@amd.com>; Zhang, Jesse(Jie) <jesse.zh...@amd.com>; Kim, Jonathan 
<jonathan....@amd.com>; Prosyak, Vitaly <vitaly.pros...@amd.com>; Zhang, 
Jesse(Jie) <jesse.zh...@amd.com>
Subject: RE: [PATCH V2 2/2] drm/amdgpu: Enable per-queue reset support

[AMD Official Use Only - AMD Internal Distribution Only]

Hi Jesse,

> -----Original Message-----
> From: jesse.zh...@amd.com <jesse.zh...@amd.com>
> Sent: Thursday, February 20, 2025 4:31 PM
> To: amd-gfx@lists.freedesktop.org
> Cc: Deucher, Alexander <alexander.deuc...@amd.com>; Zhu, Jiadong
> <jiadong....@amd.com>; Huang, Tim <tim.hu...@amd.com>; Zhang,
> Jesse(Jie) <jesse.zh...@amd.com>; Kim, Jonathan
> <jonathan....@amd.com>; Prosyak, Vitaly <vitaly.pros...@amd.com>;
> Zhang, Jesse(Jie) <jesse.zh...@amd.com>
> Subject: [PATCH V2 2/2] drm/amdgpu: Enable per-queue reset support
>
> From: "jesse.zh...@amd.com" <jesse.zh...@amd.com>
>
> - Modify the `sdma_v4_4_2_sw_init` function to conditionally enable
> per-queue reset support.
> - For IP versions 9.4.3 and 9.4.4, enable per-queue reset if the MEC
> firmware version is at least 0xb0 and PMFW supports queue reset.
> - Add a TODO comment for future support of per-queue reset for IP
> version 9.4.5.
>
> This change ensures that per-queue reset is only enabled when the MEC
> and PMFW support it.
>
> Suggested-by: Jonathan Kim <jonathan....@amd.com>
> Signed-off-by: Vitaly Prosyak <vitaly.pros...@amd.com>
> Signed-off-by: Jesse Zhang <jesse.zh...@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c
> b/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c
> index 9925b183c07f..0e004b156e95 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c
> @@ -1458,9 +1458,23 @@ static int sdma_v4_4_2_sw_init(struct
> amdgpu_ip_block *ip_block)
>               }
>       }
>
> -     /* TODO: Add queue reset mask when FW fully supports it */
>       adev->sdma.supported_reset =
>
> amdgpu_get_soft_full_reset_mask(&adev->sdma.instance[0].ring);
> +     /*
> +      * the user queue relies on MEC fw and pmfw when the sdma queue
> + do
> reset.
> +      * it needs to check both of them at here to skip old mec and pmfw.
> +      */
> +     switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
> +     case IP_VERSION(9, 4, 3):
> +     case IP_VERSION(9, 4, 4):
> +             if ((adev->gfx.mec_fw_version >= 0xb0) &&
> amdgpu_dpm_reset_sdma_is_supported(adev))
> +                     adev->gfx.compute_supported_reset |=
> AMDGPU_RESET_TYPE_PER_QUEUE;

Do you want to check the adev->gfx.compute_supported_reset here or a typo?
Thanks Tim, will fix the type. It should be adev->sdma.compute_supported_reset

Tim

> +             break;
> +     case IP_VERSION(9, 4, 5):
> +             /*TODO: enable the queue reset flag until fw supported */
> +     default:
> +             break;
> +     }
>
>       if (amdgpu_sdma_ras_sw_init(adev)) {
>               dev_err(adev->dev, "fail to initialize sdma ras
> block\n");
> --
> 2.25.1


Reply via email to