public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/msm: fix the `CRASHDUMP_READ` target of `a6xx_get_shader_block()`
@ 2024-03-26 21:23 Miguel Ojeda
  2024-03-29 18:39 ` Abhinav Kumar
  0 siblings, 1 reply; 3+ messages in thread
From: Miguel Ojeda @ 2024-03-26 21:23 UTC (permalink / raw)
  To: Rob Clark, Abhinav Kumar, Dmitry Baryshkov
  Cc: Sean Paul, Marijn Suijten, David Airlie, Daniel Vetter,
	Connor Abbott, Miguel Ojeda, linux-arm-msm, dri-devel, freedreno,
	linux-kernel

Clang 14 in an (essentially) defconfig arm64 build for next-20240326
reports [1]:

    drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:843:6: error:
    variable 'out' set but not used [-Werror,-Wunused-but-set-variable]

The variable `out` in these functions is meant to compute the `target` of
`CRASHDUMP_READ()`, but in this case only the initial value (`dumper->iova
+ A6XX_CD_DATA_OFFSET`) was being passed.

Thus use `out` as it was intended by Connor [2].

There was an alternative patch at [3] that removed the variable
altogether, but that would only use the initial value.

Fixes: 64d6255650d4 ("drm/msm: More fully implement devcoredump for a7xx")
Closes: https://lore.kernel.org/lkml/CANiq72mjc5t4n25SQvYSrOEhxxpXYPZ4pPzneSJHEnc3qApu2Q@mail.gmail.com/ [1]
Link: https://lore.kernel.org/lkml/CACu1E7HhCKMJd6fixZSPiNAz6ekoZnkMTHTcLFVmbZ-9VoLxKg@mail.gmail.com/ [2]
Link: https://lore.kernel.org/lkml/20240307093727.1978126-1-colin.i.king@gmail.com/ [3]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
 drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
index 1f5245fc2cdc..a847a0f7a73c 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
@@ -852,7 +852,7 @@ static void a6xx_get_shader_block(struct msm_gpu *gpu,
 			(block->type << 8) | i);
 
 		in += CRASHDUMP_READ(in, REG_A6XX_HLSQ_DBG_AHB_READ_APERTURE,
-			block->size, dumper->iova + A6XX_CD_DATA_OFFSET);
+			block->size, out);
 
 		out += block->size * sizeof(u32);
 	}

base-commit: 084c8e315db34b59d38d06e684b1a0dd07d30287
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/msm: fix the `CRASHDUMP_READ` target of `a6xx_get_shader_block()`
  2024-03-26 21:23 [PATCH] drm/msm: fix the `CRASHDUMP_READ` target of `a6xx_get_shader_block()` Miguel Ojeda
@ 2024-03-29 18:39 ` Abhinav Kumar
  2024-04-05  5:48   ` Dave Airlie
  0 siblings, 1 reply; 3+ messages in thread
From: Abhinav Kumar @ 2024-03-29 18:39 UTC (permalink / raw)
  To: Miguel Ojeda, Rob Clark, Dmitry Baryshkov
  Cc: Sean Paul, Marijn Suijten, David Airlie, Daniel Vetter,
	Connor Abbott, linux-arm-msm, dri-devel, freedreno, linux-kernel



On 3/26/2024 2:23 PM, Miguel Ojeda wrote:
> Clang 14 in an (essentially) defconfig arm64 build for next-20240326
> reports [1]:
> 
>      drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:843:6: error:
>      variable 'out' set but not used [-Werror,-Wunused-but-set-variable]
> 
> The variable `out` in these functions is meant to compute the `target` of
> `CRASHDUMP_READ()`, but in this case only the initial value (`dumper->iova
> + A6XX_CD_DATA_OFFSET`) was being passed.
> 
> Thus use `out` as it was intended by Connor [2].
> 
> There was an alternative patch at [3] that removed the variable
> altogether, but that would only use the initial value.
> 
> Fixes: 64d6255650d4 ("drm/msm: More fully implement devcoredump for a7xx")
> Closes: https://lore.kernel.org/lkml/CANiq72mjc5t4n25SQvYSrOEhxxpXYPZ4pPzneSJHEnc3qApu2Q@mail.gmail.com/ [1]
> Link: https://lore.kernel.org/lkml/CACu1E7HhCKMJd6fixZSPiNAz6ekoZnkMTHTcLFVmbZ-9VoLxKg@mail.gmail.com/ [2]
> Link: https://lore.kernel.org/lkml/20240307093727.1978126-1-colin.i.king@gmail.com/ [3]
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
> ---


LGTM,

Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/msm: fix the `CRASHDUMP_READ` target of `a6xx_get_shader_block()`
  2024-03-29 18:39 ` Abhinav Kumar
@ 2024-04-05  5:48   ` Dave Airlie
  0 siblings, 0 replies; 3+ messages in thread
From: Dave Airlie @ 2024-04-05  5:48 UTC (permalink / raw)
  To: Abhinav Kumar
  Cc: Miguel Ojeda, Rob Clark, Dmitry Baryshkov, Sean Paul,
	Marijn Suijten, Daniel Vetter, Connor Abbott, linux-arm-msm,
	dri-devel, freedreno, linux-kernel

On Sat, 30 Mar 2024 at 04:39, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote:
>
>
>
> On 3/26/2024 2:23 PM, Miguel Ojeda wrote:
> > Clang 14 in an (essentially) defconfig arm64 build for next-20240326
> > reports [1]:
> >
> >      drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:843:6: error:
> >      variable 'out' set but not used [-Werror,-Wunused-but-set-variable]
> >
> > The variable `out` in these functions is meant to compute the `target` of
> > `CRASHDUMP_READ()`, but in this case only the initial value (`dumper->iova
> > + A6XX_CD_DATA_OFFSET`) was being passed.
> >
> > Thus use `out` as it was intended by Connor [2].
> >
> > There was an alternative patch at [3] that removed the variable
> > altogether, but that would only use the initial value.
> >
> > Fixes: 64d6255650d4 ("drm/msm: More fully implement devcoredump for a7xx")
> > Closes: https://lore.kernel.org/lkml/CANiq72mjc5t4n25SQvYSrOEhxxpXYPZ4pPzneSJHEnc3qApu2Q@mail.gmail.com/ [1]
> > Link: https://lore.kernel.org/lkml/CACu1E7HhCKMJd6fixZSPiNAz6ekoZnkMTHTcLFVmbZ-9VoLxKg@mail.gmail.com/ [2]
> > Link: https://lore.kernel.org/lkml/20240307093727.1978126-1-colin.i.king@gmail.com/ [3]
> > Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
> > ---
>
>
> LGTM,
>
> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>

I'm seeing this on my drm-next tree, where is this fix landing?

Dave.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-05  5:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-26 21:23 [PATCH] drm/msm: fix the `CRASHDUMP_READ` target of `a6xx_get_shader_block()` Miguel Ojeda
2024-03-29 18:39 ` Abhinav Kumar
2024-04-05  5:48   ` Dave Airlie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox