[PATCH] drm/amdgpu: skip to create ras xxx_err_count node when ACA is enabled

Zhou1, Tao Tao.Zhou1 at amd.com
Fri Apr 26 03:06:54 UTC 2024


[AMD Official Use Only - General]

Reviewed-by: Tao Zhou <tao.zhou1 at amd.com>

[Tao] it's better to add comment to explain how to get error count when aca is enabled.

BTW, according to the change, do we need to update ras tool?

> -----Original Message-----
> From: Wang, Yang(Kevin) <KevinYang.Wang at amd.com>
> Sent: Wednesday, April 24, 2024 10:50 AM
> 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: skip to create ras xxx_err_count node when ACA
> is enabled
>
> skip to create 'xxx_err_count' node when ACA is enabled.
>
> 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 1e2b866751c3..96a8359b703b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -1756,6 +1756,9 @@ int amdgpu_ras_sysfs_create(struct amdgpu_device
> *adev,
>       if (!obj || obj->attr_inuse)
>               return -EINVAL;
>
> +     if (amdgpu_aca_is_enabled(adev))
> +             return 0;
> +
>       get_obj(obj);
>
>       snprintf(obj->fs_data.sysfs_name, sizeof(obj->fs_data.sysfs_name), @@ -
> 1790,6 +1793,9 @@ int amdgpu_ras_sysfs_remove(struct amdgpu_device *adev,
>       if (!obj || !obj->attr_inuse)
>               return -EINVAL;
>
> +     if (amdgpu_aca_is_enabled(adev))
> +             return 0;
> +
>       if (adev->dev->kobj.sd)
>               sysfs_remove_file_from_group(&adev->dev->kobj,
>                               &obj->sysfs_attr.attr,
> --
> 2.34.1



More information about the amd-gfx mailing list