[PATCH] drm/amdgpu: skip call ras_late_init if ras feature is not enabled

Zhou1, Tao Tao.Zhou1 at amd.com
Thu Jan 18 08:05:56 UTC 2024


[AMD Official Use Only - General]

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

> -----Original Message-----
> From: Wang, Yang(Kevin) <KevinYang.Wang at amd.com>
> Sent: Thursday, January 18, 2024 3:50 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Zhang, Hawking <Hawking.Zhang at amd.com>; Zhou1, Tao
> <Tao.Zhou1 at amd.com>; Wang, Yang(Kevin) <KevinYang.Wang at amd.com>
> Subject: [PATCH] drm/amdgpu: skip call ras_late_init if ras feature is not enabled
>
> skip call ras_late_init callback if ras feature is not enabled.
>
> Signed-off-by: Yang Wang <kevinyang.wang at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index 5c817c155d72..5c73d0871220 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -3312,6 +3312,9 @@ int amdgpu_ras_late_init(struct amdgpu_device
> *adev)
>               }
>
>               obj = node->ras_obj;
> +             if (!amdgpu_ras_is_feature_enabled(adev, &obj->ras_comm))
> +                     continue;
> +
>               if (obj->ras_late_init) {
>                       r = obj->ras_late_init(adev, &obj->ras_comm);
>                       if (r) {
> --
> 2.34.1



More information about the amd-gfx mailing list