* [PATCH] drm/amdgpu: fix AMDGPU_RAS_BLOCK__DF check
@ 2023-03-29 5:27 ` Dan Carpenter
0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2023-03-29 5:27 UTC (permalink / raw)
To: Hawking Zhang
Cc: Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
Hawking Zhang, Tao Zhou, Stanley.Yang, YiPeng Chai, Victor Zhao,
Candice Li, amd-gfx, kernel-janitors
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@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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] drm/amdgpu: fix AMDGPU_RAS_BLOCK__DF check
@ 2023-03-29 5:27 ` Dan Carpenter
0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2023-03-29 5:27 UTC (permalink / raw)
To: Hawking Zhang
Cc: Pan, Xinhui, Tao Zhou, kernel-janitors, amd-gfx, YiPeng Chai,
Stanley.Yang, Daniel Vetter, Victor Zhao, Candice Li,
David Airlie, Christian König, Hawking Zhang
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@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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: [PATCH] drm/amdgpu: fix AMDGPU_RAS_BLOCK__DF check
2023-03-29 5:27 ` Dan Carpenter
@ 2023-03-29 5:31 ` Zhang, Hawking
-1 siblings, 0 replies; 6+ messages in thread
From: Zhang, Hawking @ 2023-03-29 5:31 UTC (permalink / raw)
To: Dan Carpenter
Cc: Koenig, Christian, Pan, Xinhui, David Airlie, Daniel Vetter,
Zhou1, Tao, Yang, Stanley, Chai, Thomas, Zhao, Victor, Li,
Candice, amd-gfx, kernel-janitors
[AMD Official Use Only - General]
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Regards,
Hawking
-----Original Message-----
From: Dan Carpenter <error27@gmail.com>
Sent: Wednesday, March 29, 2023 13:28
To: Zhang, Hawking <Hawking.Zhang@amd.com>
Cc: Koenig, Christian <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; David Airlie <airlied@gmail.com>; Daniel Vetter <daniel@ffwll.ch>; Zhang, Hawking <Hawking.Zhang@amd.com>; Zhou1, Tao <Tao.Zhou1@amd.com>; Yang, Stanley <Stanley.Yang@amd.com>; Chai, Thomas <YiPeng.Chai@amd.com>; Zhao, Victor <Victor.Zhao@amd.com>; Li, Candice <Candice.Li@amd.com>; amd-gfx@lists.freedesktop.org; kernel-janitors@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 <error27@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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: [PATCH] drm/amdgpu: fix AMDGPU_RAS_BLOCK__DF check
@ 2023-03-29 5:31 ` Zhang, Hawking
0 siblings, 0 replies; 6+ messages in thread
From: Zhang, Hawking @ 2023-03-29 5:31 UTC (permalink / raw)
To: Dan Carpenter
Cc: Pan, Xinhui, Zhou1, Tao, kernel-janitors, amd-gfx, Chai, Thomas,
Yang, Stanley, Daniel Vetter, Zhao, Victor, Li, Candice,
David Airlie, Koenig, Christian
[AMD Official Use Only - General]
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Regards,
Hawking
-----Original Message-----
From: Dan Carpenter <error27@gmail.com>
Sent: Wednesday, March 29, 2023 13:28
To: Zhang, Hawking <Hawking.Zhang@amd.com>
Cc: Koenig, Christian <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; David Airlie <airlied@gmail.com>; Daniel Vetter <daniel@ffwll.ch>; Zhang, Hawking <Hawking.Zhang@amd.com>; Zhou1, Tao <Tao.Zhou1@amd.com>; Yang, Stanley <Stanley.Yang@amd.com>; Chai, Thomas <YiPeng.Chai@amd.com>; Zhao, Victor <Victor.Zhao@amd.com>; Li, Candice <Candice.Li@amd.com>; amd-gfx@lists.freedesktop.org; kernel-janitors@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 <error27@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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amdgpu: fix AMDGPU_RAS_BLOCK__DF check
2023-03-29 5:31 ` Zhang, Hawking
@ 2023-03-29 21:08 ` Alex Deucher
-1 siblings, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2023-03-29 21:08 UTC (permalink / raw)
To: Zhang, Hawking
Cc: Dan Carpenter, Pan, Xinhui, Zhou1, Tao, kernel-janitors, amd-gfx,
Chai, Thomas, Yang, Stanley, Daniel Vetter, Zhao, Victor, Li,
Candice, David Airlie, Koenig, Christian
Applied. Thanks!
On Wed, Mar 29, 2023 at 1:31 AM Zhang, Hawking <Hawking.Zhang@amd.com> wrote:
>
> [AMD Official Use Only - General]
>
> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
>
> Regards,
> Hawking
> -----Original Message-----
> From: Dan Carpenter <error27@gmail.com>
> Sent: Wednesday, March 29, 2023 13:28
> To: Zhang, Hawking <Hawking.Zhang@amd.com>
> Cc: Koenig, Christian <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; David Airlie <airlied@gmail.com>; Daniel Vetter <daniel@ffwll.ch>; Zhang, Hawking <Hawking.Zhang@amd.com>; Zhou1, Tao <Tao.Zhou1@amd.com>; Yang, Stanley <Stanley.Yang@amd.com>; Chai, Thomas <YiPeng.Chai@amd.com>; Zhao, Victor <Victor.Zhao@amd.com>; Li, Candice <Candice.Li@amd.com>; amd-gfx@lists.freedesktop.org; kernel-janitors@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 <error27@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amdgpu: fix AMDGPU_RAS_BLOCK__DF check
@ 2023-03-29 21:08 ` Alex Deucher
0 siblings, 0 replies; 6+ messages in thread
From: Alex Deucher @ 2023-03-29 21:08 UTC (permalink / raw)
To: Zhang, Hawking
Cc: Pan, Xinhui, Dan Carpenter, Zhou1, Tao, kernel-janitors, amd-gfx,
Chai, Thomas, Yang, Stanley, Daniel Vetter, Zhao, Victor, Li,
Candice, David Airlie, Koenig, Christian
Applied. Thanks!
On Wed, Mar 29, 2023 at 1:31 AM Zhang, Hawking <Hawking.Zhang@amd.com> wrote:
>
> [AMD Official Use Only - General]
>
> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
>
> Regards,
> Hawking
> -----Original Message-----
> From: Dan Carpenter <error27@gmail.com>
> Sent: Wednesday, March 29, 2023 13:28
> To: Zhang, Hawking <Hawking.Zhang@amd.com>
> Cc: Koenig, Christian <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; David Airlie <airlied@gmail.com>; Daniel Vetter <daniel@ffwll.ch>; Zhang, Hawking <Hawking.Zhang@amd.com>; Zhou1, Tao <Tao.Zhou1@amd.com>; Yang, Stanley <Stanley.Yang@amd.com>; Chai, Thomas <YiPeng.Chai@amd.com>; Zhao, Victor <Victor.Zhao@amd.com>; Li, Candice <Candice.Li@amd.com>; amd-gfx@lists.freedesktop.org; kernel-janitors@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 <error27@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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-03-29 21:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-29 5:27 [PATCH] drm/amdgpu: fix AMDGPU_RAS_BLOCK__DF check Dan Carpenter
2023-03-29 5:27 ` Dan Carpenter
2023-03-29 5:31 ` Zhang, Hawking
2023-03-29 5:31 ` Zhang, Hawking
2023-03-29 21:08 ` Alex Deucher
2023-03-29 21:08 ` Alex Deucher
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.