[PATCH] drm/amdgpu: improve RAS ACA to avoid binding unsupported RAS blocks
Zhou1, Tao
Tao.Zhou1 at amd.com
Mon Dec 9 09:19:02 UTC 2024
[AMD Official Use Only - AMD Internal Distribution Only]
Reviewed-by: Tao Zhou <tao.zhou1 at amd.com>
> -----Original Message-----
> From: Wang, Yang(Kevin) <KevinYang.Wang at amd.com>
> Sent: Monday, December 9, 2024 5:01 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Zhang, Hawking <Hawking.Zhang at amd.com>; Zhou1, Tao
> <Tao.Zhou1 at amd.com>
> Subject: [PATCH] drm/amdgpu: improve RAS ACA to avoid binding unsupported
> RAS blocks
>
> Improve RAS ACA code to avoid binding unsupported RAS blocks, thus avoiding
> invalid ACA Bank to ACA Bank cache, and also reduce system memory
> consumption.
>
> Signed-off-by: Yang Wang <kevinyang.wang at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index db081618e85c..54426e04c7bf 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -1302,6 +1302,9 @@ int amdgpu_ras_bind_aca(struct amdgpu_device *adev,
> enum amdgpu_ras_block blk,
> if (adev->in_suspend || amdgpu_reset_in_recovery(adev))
> return 0;
>
> + if (!amdgpu_ras_is_supported(adev, blk))
> + return 0;
> +
> obj = get_ras_manager(adev, blk);
> if (!obj)
> return -EINVAL;
> @@ -1313,6 +1316,9 @@ int amdgpu_ras_unbind_aca(struct amdgpu_device
> *adev, enum amdgpu_ras_block blk) {
> struct ras_manager *obj;
>
> + if (!amdgpu_ras_is_supported(adev, blk))
> + return 0;
> +
> obj = get_ras_manager(adev, blk);
> if (!obj)
> return -EINVAL;
> --
> 2.34.1
More information about the amd-gfx
mailing list