[PATCH V2 1/2] drm/amdgpu: Add ras supported check for register_ras_block
Zhou1, Tao
Tao.Zhou1 at amd.com
Thu Jan 13 03:20:16 UTC 2022
[AMD Official Use Only]
The series is:
Reviewed-by: Tao Zhou <tao.zhou1 at amd.com>
> -----Original Message-----
> From: Chai, Thomas <YiPeng.Chai at amd.com>
> Sent: Wednesday, January 12, 2022 6:39 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Chai, Thomas <YiPeng.Chai at amd.com>; Zhang, Hawking
> <Hawking.Zhang at amd.com>; Zhou1, Tao <Tao.Zhou1 at amd.com>; Clements,
> John <John.Clements at amd.com>; Chai, Thomas <YiPeng.Chai at amd.com>
> Subject: [PATCH V2 1/2] drm/amdgpu: Add ras supported check for
> register_ras_block
>
> Add ras supported check for register_ras_block.
>
> Signed-off-by: yipechai <YiPeng.Chai 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 b1bedfd4febc..614ae8455c9f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -2757,6 +2757,9 @@ int amdgpu_ras_register_ras_block(struct
> amdgpu_device *adev,
> if (!adev || !ras_block_obj)
> return -EINVAL;
>
> + if (!amdgpu_ras_asic_supported(adev))
> + return 0;
> +
> INIT_LIST_HEAD(&ras_block_obj->node);
> list_add_tail(&ras_block_obj->node, &adev->ras_list);
>
> --
> 2.25.1
More information about the amd-gfx
mailing list