Skip to contentSkip to conversation

drm/msm: fix the `CRASHDUMP_READ` target of `a6xx_get_shader_block()`

PATCH In review Miguel Ojeda 3 participants 3 messages Mar 26, 2024 – Apr 5, 2024

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/msm: fix the `CRASHDUMP_READ` target of `a6xx_get_shader_block()`

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.

---
 drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c +1 -1
index 1f5245fc2cdc..a847a0f7a73c 100644
@@ -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

Signature · 1 line
2.44.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Miguel Ojeda

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.

Quoted 6 lines

---

LGTM,

maintainer
#2 lore raw
Quoted 27 lines · Abhinav Kumar
Quoted 15 lines · Miguel Ojeda

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.

Quoted 6 lines

---

Quoted 3 lines

LGTM,

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

Dave.