Skip to content

Commit b859f9b

Browse files
committed
drm/msm/gpu: Snapshot GMU debug buffer
It appears to be a GMU fw build option whether it does anything with debug and log buffers, but if they are all zeros it won't add anything to the devcore size. Signed-off-by: Rob Clark <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Clark <[email protected]>
1 parent 1691e00 commit b859f9b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ struct a6xx_gpu_state {
4444

4545
struct msm_gpu_state_bo *gmu_log;
4646
struct msm_gpu_state_bo *gmu_hfi;
47+
struct msm_gpu_state_bo *gmu_debug;
4748

4849
s32 hfi_queue_history[2][HFI_HISTORY_SZ];
4950

@@ -983,6 +984,7 @@ struct msm_gpu_state *a6xx_gpu_state_get(struct msm_gpu *gpu)
983984

984985
a6xx_state->gmu_log = a6xx_snapshot_gmu_bo(a6xx_state, &a6xx_gpu->gmu.log);
985986
a6xx_state->gmu_hfi = a6xx_snapshot_gmu_bo(a6xx_state, &a6xx_gpu->gmu.hfi);
987+
a6xx_state->gmu_debug = a6xx_snapshot_gmu_bo(a6xx_state, &a6xx_gpu->gmu.debug);
986988

987989
a6xx_snapshot_gmu_hfi_history(gpu, a6xx_state);
988990

@@ -1274,6 +1276,16 @@ void a6xx_show(struct msm_gpu *gpu, struct msm_gpu_state *state,
12741276
&gmu_hfi->encoded);
12751277
}
12761278

1279+
drm_puts(p, "gmu-debug:\n");
1280+
if (a6xx_state->gmu_debug) {
1281+
struct msm_gpu_state_bo *gmu_debug = a6xx_state->gmu_debug;
1282+
1283+
drm_printf(p, " iova: 0x%016llx\n", gmu_debug->iova);
1284+
drm_printf(p, " size: %zu\n", gmu_debug->size);
1285+
adreno_show_object(p, &gmu_debug->data, gmu_debug->size,
1286+
&gmu_debug->encoded);
1287+
}
1288+
12771289
drm_puts(p, "registers:\n");
12781290
for (i = 0; i < a6xx_state->nr_registers; i++) {
12791291
struct a6xx_gpu_state_obj *obj = &a6xx_state->registers[i];

0 commit comments

Comments
 (0)