[PATCH V2 2/2] drm/amdgpu: Enable per-queue reset support
Zhang, Jesse(Jie)
Jesse.Zhang at amd.com
Thu Feb 20 09:00:40 UTC 2025
[AMD Official Use Only - AMD Internal Distribution Only]
-----Original Message-----
From: Huang, Tim <Tim.Huang at amd.com>
Sent: Thursday, February 20, 2025 4:55 PM
To: Zhang, Jesse(Jie) <Jesse.Zhang at amd.com>; amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; Zhu, Jiadong <Jiadong.Zhu at amd.com>; Zhang, Jesse(Jie) <Jesse.Zhang at amd.com>; Kim, Jonathan <Jonathan.Kim at amd.com>; Prosyak, Vitaly <Vitaly.Prosyak at amd.com>; Zhang, Jesse(Jie) <Jesse.Zhang at 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.zhang at amd.com <jesse.zhang at amd.com>
> Sent: Thursday, February 20, 2025 4:31 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; Zhu, Jiadong
> <Jiadong.Zhu at amd.com>; Huang, Tim <Tim.Huang at amd.com>; Zhang,
> Jesse(Jie) <Jesse.Zhang at amd.com>; Kim, Jonathan
> <Jonathan.Kim at amd.com>; Prosyak, Vitaly <Vitaly.Prosyak at amd.com>;
> Zhang, Jesse(Jie) <Jesse.Zhang at amd.com>
> Subject: [PATCH V2 2/2] drm/amdgpu: Enable per-queue reset support
>
> From: "Jesse.zhang at amd.com" <Jesse.zhang at 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.Kim at amd.com>
> Signed-off-by: Vitaly Prosyak <vitaly.prosyak at amd.com>
> Signed-off-by: Jesse Zhang <jesse.zhang at 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
More information about the amd-gfx
mailing list