[PATCH] drm/amdgpu: remove RAS's useless code

Chen, Guchun Guchun.Chen at amd.com
Tue Jun 2 06:18:24 UTC 2020


[AMD Public Use]

Exactly Tao.
When hw_support capability is aligned with AMDGPU_RAS_BLOCK_MASK by and operation, sw_support capability is calculated on top of hw_support value and amdgpu_ras_mask accordingly.

Regards,
Guchun

-----Original Message-----
From: Zhou1, Tao <Tao.Zhou1 at amd.com> 
Sent: Tuesday, June 2, 2020 2:12 PM
To: Chen, Guchun <Guchun.Chen at amd.com>; amd-gfx at lists.freedesktop.org; Zhang, Hawking <Hawking.Zhang at amd.com>; Li, Dennis <Dennis.Li at amd.com>; Clements, John <John.Clements at amd.com>
Subject: RE: [PATCH] drm/amdgpu: remove RAS's useless code

[AMD Public Use]

I think the real reason is we have " *hw_supported &= AMDGPU_RAS_BLOCK_MASK;" already, but the patch is:

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

> -----Original Message-----
> From: Chen, Guchun <Guchun.Chen at amd.com>
> Sent: 2020年6月2日 13:58
> To: amd-gfx at lists.freedesktop.org; Zhang, Hawking 
> <Hawking.Zhang at amd.com>; Zhou1, Tao <Tao.Zhou1 at amd.com>; Li, Dennis 
> <Dennis.Li at amd.com>; Clements, John <John.Clements at amd.com>
> Cc: Chen, Guchun <Guchun.Chen at amd.com>
> Subject: [PATCH] drm/amdgpu: remove RAS's useless code
> 
> Module parameter amdgpu_ras_mask has been involved in the calculation 
> of ras support capability, so drop this redundant code.
> 
> Signed-off-by: Guchun Chen <guchun.chen at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index 79bb05d791bc..337bf2da7bdc 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -1902,8 +1902,6 @@ int amdgpu_ras_init(struct amdgpu_device *adev)
>  			goto err_out;
>  	}
> 
> -	amdgpu_ras_mask &= AMDGPU_RAS_BLOCK_MASK;
> -
>  	if (amdgpu_ras_fs_init(adev)) {
>  		r = -EINVAL;
>  		goto err_out;
> --
> 2.17.1


More information about the amd-gfx mailing list