[AMD Official Use Only - General] Reviewed-by: Hawking Zhang <[email protected]>
Regards, Hawking -----Original Message----- From: Dan Carpenter <[email protected]> Sent: Wednesday, March 29, 2023 13:28 To: Zhang, Hawking <[email protected]> Cc: Koenig, Christian <[email protected]>; Pan, Xinhui <[email protected]>; David Airlie <[email protected]>; Daniel Vetter <[email protected]>; Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>; Zhao, Victor <[email protected]>; Li, Candice <[email protected]>; [email protected]; [email protected] 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 <[email protected]> --- >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
