Re: [PATCH] drm/amdgpu: fix AMDGPU_RAS_BLOCK__DF check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Applied.  Thanks!

On Wed, Mar 29, 2023 at 1:31 AM Zhang, Hawking <Hawking.Zhang@xxxxxxx> wrote:
>
> [AMD Official Use Only - General]
>
> Reviewed-by: Hawking Zhang <Hawking.Zhang@xxxxxxx>
>
> Regards,
> Hawking
> -----Original Message-----
> From: Dan Carpenter <error27@xxxxxxxxx>
> Sent: Wednesday, March 29, 2023 13:28
> To: Zhang, Hawking <Hawking.Zhang@xxxxxxx>
> Cc: Koenig, Christian <Christian.Koenig@xxxxxxx>; Pan, Xinhui <Xinhui.Pan@xxxxxxx>; David Airlie <airlied@xxxxxxxxx>; Daniel Vetter <daniel@xxxxxxxx>; Zhang, Hawking <Hawking.Zhang@xxxxxxx>; Zhou1, Tao <Tao.Zhou1@xxxxxxx>; Yang, Stanley <Stanley.Yang@xxxxxxx>; Chai, Thomas <YiPeng.Chai@xxxxxxx>; Zhao, Victor <Victor.Zhao@xxxxxxx>; Li, Candice <Candice.Li@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx; kernel-janitors@xxxxxxxxxxxxxxx
> Subject: [PATCH] drm/amdgpu: fix AMDGPU_RAS_BLOCK__DF check
>
> There is a mixup where AMDGPU_RAS_BLOCK__DF is used as a mask instead of a shifter.  It means that this condition will be true for AMDGPU_RAS_BLOCK__MMHUB instead of for AMDGPU_RAS_BLOCK__DF.
>
> Fixes: b6f512168478 ("drm/amdgpu: Add fatal error handling in nbio v4_3")
> Signed-off-by: Dan Carpenter <error27@xxxxxxxxx>
> ---
> From static analysis.  Not tested at all.
>
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index fac45f98145d..4069bce9479f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -2564,7 +2564,7 @@ int amdgpu_ras_init(struct amdgpu_device *adev)
>                         adev->nbio.ras = &nbio_v7_4_ras;
>                 break;
>         case IP_VERSION(4, 3, 0):
> -               if (adev->ras_hw_enabled & AMDGPU_RAS_BLOCK__DF)
> +               if (adev->ras_hw_enabled & (1 << AMDGPU_RAS_BLOCK__DF))
>                         /* unlike other generation of nbio ras,
>                          * nbio v4_3 only support fatal error interrupt
>                          * to inform software that DF is freezed due to
> --
> 2.39.1




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux