Applied. Thanks!
On Wed, Mar 29, 2023 at 1:31 AM Zhang, Hawking <hawking.zh...@amd.com> wrote: > > [AMD Official Use Only - General] > > Reviewed-by: Hawking Zhang <hawking.zh...@amd.com> > > Regards, > Hawking > -----Original Message----- > From: Dan Carpenter <erro...@gmail.com> > Sent: Wednesday, March 29, 2023 13:28 > To: Zhang, Hawking <hawking.zh...@amd.com> > Cc: Koenig, Christian <christian.koe...@amd.com>; Pan, Xinhui > <xinhui....@amd.com>; David Airlie <airl...@gmail.com>; Daniel Vetter > <dan...@ffwll.ch>; Zhang, Hawking <hawking.zh...@amd.com>; Zhou1, Tao > <tao.zh...@amd.com>; Yang, Stanley <stanley.y...@amd.com>; Chai, Thomas > <yipeng.c...@amd.com>; Zhao, Victor <victor.z...@amd.com>; Li, Candice > <candice...@amd.com>; amd-gfx@lists.freedesktop.org; > kernel-janit...@vger.kernel.org > 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 <erro...@gmail.com> > --- > 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