[PATCH] drm/amdgpu: Allow issue disable gfx ras cmd to firmware
Zhou1, Tao
Tao.Zhou1 at amd.com
Thu Aug 24 01:53:42 UTC 2023
[AMD Official Use Only - General]
Reviewed-by: Tao Zhou <tao.zhou1 at amd.com>
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Hawking
> Zhang
> Sent: Thursday, August 24, 2023 9:49 AM
> To: amd-gfx at lists.freedesktop.org; Yang, Stanley <Stanley.Yang at amd.com>;
> Zhou1, Tao <Tao.Zhou1 at amd.com>
> Cc: Zhang, Hawking <Hawking.Zhang at amd.com>
> Subject: [PATCH] drm/amdgpu: Allow issue disable gfx ras cmd to firmware
>
> Disable gfx ras command is needed in some use cases like live migration.
>
> Signed-off-by: Hawking Zhang <Hawking.Zhang at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index 378478cf9c21..7db6baa16236 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -769,9 +769,10 @@ int amdgpu_ras_feature_enable(struct amdgpu_device
> *adev,
> if (!con)
> return -EINVAL;
>
> - /* Do not enable ras feature if it is not allowed */
> - if (enable &&
> - head->block != AMDGPU_RAS_BLOCK__GFX &&
> + /* For non-gfx ip, do not enable ras feature if it is not allowed.
> + * For gfx ip, regardless of feature support status,
> + * force issue enable or disable ras feature commands */
> + if (head->block != AMDGPU_RAS_BLOCK__GFX &&
> !amdgpu_ras_is_feature_allowed(adev, head))
> goto out;
>
> --
> 2.17.1
More information about the amd-gfx
mailing list