From d7850b26b6b5ce3f44a18411080573311cb2f2b7 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Mon, 3 Nov 2025 08:44:42 -0800 Subject: [PATCH] freedreno/a6xx: Drop emit_marker6() For a6xx+ devcoredump+crashdec does a good job in finding the CP position on a crash. I don't really use the scratch regs for this purpose anymore. So lets just drop this. Signed-off-by: Rob Clark Part-of: --- src/gallium/drivers/freedreno/a6xx/fd6_context.h | 12 ------------ src/gallium/drivers/freedreno/a6xx/fd6_draw.cc | 10 ---------- src/gallium/drivers/freedreno/a6xx/fd6_emit.cc | 2 -- src/gallium/drivers/freedreno/a6xx/fd6_emit.h | 6 ------ src/gallium/drivers/freedreno/a6xx/fd6_gmem.cc | 12 ------------ 5 files changed, 42 deletions(-) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_context.h b/src/gallium/drivers/freedreno/a6xx/fd6_context.h index c8cdb914b09..ec55d063c50 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_context.h +++ b/src/gallium/drivers/freedreno/a6xx/fd6_context.h @@ -165,18 +165,6 @@ struct fd6_control { #define control_ptr(fd6_ctx, member) \ (fd6_ctx)->control_mem, offsetof(struct fd6_control, member) -template -static inline void -emit_marker6(fd_cs &cs, int scratch_idx) -{ - extern int32_t marker_cnt; - if (__EMIT_MARKER) { - fd_pkt7(cs, CP_WAIT_FOR_IDLE, 0); - fd_pkt4(cs, 1) - .add(CP_SCRATCH_REG(CHIP, scratch_idx, p_atomic_inc_return(&marker_cnt))); - } -} - struct fd6_vertex_stateobj { struct fd_vertex_stateobj base; struct fd_ringbuffer *stateobj; diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_draw.cc b/src/gallium/drivers/freedreno/a6xx/fd6_draw.cc index c2489591905..c680a35a2f9 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_draw.cc +++ b/src/gallium/drivers/freedreno/a6xx/fd6_draw.cc @@ -479,14 +479,6 @@ draw_vbos(struct fd_context *ctx, const struct pipe_draw_info *info, fd6_barrier_flush(cs, ctx->batch); - /* for debug after a lock up, write a unique counter value - * to scratch7 for each draw, to make it easier to match up - * register dumps to cmdstream. The combination of IB - * (scratch6) and DRAW is enough to "triangulate" the - * particular draw that caused lockup. - */ - emit_marker6(cs, 7); - if (is_indirect(DRAW)) { assert(num_draws == 1); /* only >1 for direct draws */ if (DRAW == DRAW_INDIRECT_OP_XFB) { @@ -551,8 +543,6 @@ draw_vbos(struct fd_context *ctx, const struct pipe_draw_info *info, } } - emit_marker6(cs, 7); - flush_streamout(ctx, cs, &emit); fd_context_all_clean(ctx); diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.cc b/src/gallium/drivers/freedreno/a6xx/fd6_emit.cc index aa9e9dfa184..b4069e305bb 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.cc +++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.cc @@ -558,8 +558,6 @@ fd6_emit_3d_state(fd_cs &cs, struct fd6_emit *emit) const struct fd6_program_state *prog = fd6_emit_get_prog(emit); const struct ir3_shader_variant *fs = emit->fs; - emit_marker6(cs, 5); - /* Special case, we need to re-emit bindless FS state w/ the * fb-read state appended: */ diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.h b/src/gallium/drivers/freedreno/a6xx/fd6_emit.h index 3e23f1d8f64..b27034b1f3e 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.h +++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.h @@ -285,9 +285,7 @@ template static inline void fd6_emit_blit(struct fd_context *ctx, fd_cs &cs) { - emit_marker6(cs, 7); fd6_event_write(ctx, cs, FD_CCU_RESOLVE); - emit_marker6(cs, 7); } template @@ -402,8 +400,6 @@ fd6_emit_ib(fd_cs &cs, struct fd_ringbuffer *target) unsigned count = fd_ringbuffer_cmd_count(target); - emit_marker6(cs, 6); - for (unsigned i = 0; i < count; i++) { uint32_t dwords; @@ -413,8 +409,6 @@ fd6_emit_ib(fd_cs &cs, struct fd_ringbuffer *target) assert(dwords > 0); } - - emit_marker6(cs, 6); } #endif /* FD6_EMIT_H */ diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_gmem.cc b/src/gallium/drivers/freedreno/a6xx/fd6_gmem.cc index a2a41ef7b1e..2529ce5d7be 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_gmem.cc +++ b/src/gallium/drivers/freedreno/a6xx/fd6_gmem.cc @@ -809,8 +809,6 @@ emit_conditional_ib(fd_cs &cs, struct fd_batch *batch, const struct fd_tile *til if (target->cur == target->start) return; - emit_marker6(cs, 6); - unsigned count = fd_ringbuffer_cmd_count(target); BEGIN_RING(cs, 5 + 4 * count); /* ensure conditional doesn't get split */ @@ -835,8 +833,6 @@ emit_conditional_ib(fd_cs &cs, struct fd_batch *batch, const struct fd_tile *til assert(dwords > 0); } - - emit_marker6(cs, 6); } template @@ -929,10 +925,8 @@ emit_binning_pass(fd_cs &cs, struct fd_batch *batch) assert_dt set_scissor(cs, 0, 0, gmem->width - 1, gmem->height - 1); - emit_marker6(cs, 7); fd_pkt7(cs, CP_SET_MARKER, 1) .add(A6XX_CP_SET_MARKER_0_MODE(RM6_BIN_VISIBILITY)); - emit_marker6(cs, 7); fd_pkt7(cs, CP_SET_VISIBILITY_OVERRIDE, 1) .add(0x1); @@ -1213,11 +1207,9 @@ fd6_emit_tile_prep(struct fd_batch *batch, const struct fd_tile *tile) struct fd6_context *fd6_ctx = fd6_context(ctx); fd_cs cs(batch->gmem); - emit_marker6(cs, 7); fd_pkt7(cs, CP_SET_MARKER, 1) .add(A6XX_CP_SET_MARKER_0_MODE(RM6_BIN_RENDER_START) | A6XX_CP_SET_MARKER_0_USES_GMEM); - emit_marker6(cs, 7); uint32_t x1 = tile->xoff; uint32_t y1 = tile->yoff; @@ -1864,10 +1856,8 @@ fd6_emit_tile_gmem2mem(struct fd_batch *batch, const struct fd_tile *tile) fd_pkt7(cs, CP_SKIP_IB2_ENABLE_LOCAL, 1) .add(0x0); - emit_marker6(cs, 7); fd_pkt7(cs, CP_SET_MARKER, 1) .add(A6XX_CP_SET_MARKER_0(.mode = RM6_BIN_RESOLVE, .uses_gmem = true)); - emit_marker6(cs, 7); if (batch->tile_store) { trace_start_tile_stores(&batch->trace, cs, batch->resolve); @@ -2029,10 +2019,8 @@ fd6_emit_sysmem_prep(struct fd_batch *batch) assert_dt crb.add(VPC_SO_OVERRIDE(CHIP, false)); } - emit_marker6(cs, 7); fd_pkt7(cs, CP_SET_MARKER, 1) .add(A6XX_CP_SET_MARKER_0_MODE(RM6_DIRECT_RENDER)); - emit_marker6(cs, 7); fd_pkt7(cs, CP_SKIP_IB2_ENABLE_GLOBAL, 1) .add(0x0);