diff options
author | Jerome Glisse <[email protected]> | 2013-04-23 19:22:33 -0400 |
---|---|---|
committer | Jerome Glisse <[email protected]> | 2013-04-25 18:36:31 -0400 |
commit | abb96fdea70546f974ba59cbd00bc54afee9cfdb (patch) | |
tree | 26cd3596731ed64e3a242ded8779bb1930472a70 /src/gallium/drivers/r600/r600_hw_context.c | |
parent | 53fbae7eace466d8fe22173c01518fbde7102d6c (diff) |
winsys/radeon: consolidate tracing into winsys v2
This move the tracing timeout and printing into winsys and add
an debug environement variable for it (R600_DEBUG=trace_cs).
Lot of file touched because of winsys API changes.
v2: Do not write lockup file if ib uniq id does not match last one
Signed-off-by: Jerome Glisse <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_hw_context.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_hw_context.c | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c index b4fb3bf7933..3abce1ebde2 100644 --- a/src/gallium/drivers/r600/r600_hw_context.c +++ b/src/gallium/drivers/r600/r600_hw_context.c @@ -137,21 +137,17 @@ void r600_need_cs_space(struct r600_context *ctx, unsigned num_dw, for (i = 0; i < R600_NUM_ATOMS; i++) { if (ctx->atoms[i] && ctx->atoms[i]->dirty) { num_dw += ctx->atoms[i]->num_dw; -#if R600_TRACE_CS if (ctx->screen->trace_bo) { num_dw += R600_TRACE_CS_DWORDS; } -#endif } } /* The upper-bound of how much space a draw command would take. */ num_dw += R600_MAX_FLUSH_CS_DWORDS + R600_MAX_DRAW_CS_DWORDS; -#if R600_TRACE_CS if (ctx->screen->trace_bo) { num_dw += R600_TRACE_CS_DWORDS; } -#endif } /* Count in queries_suspend. */ @@ -339,37 +335,7 @@ void r600_context_flush(struct r600_context *ctx, unsigned flags) } /* Flush the CS. */ -#if R600_TRACE_CS - if (ctx->screen->trace_bo) { - struct r600_screen *rscreen = ctx->screen; - unsigned i; - - for (i = 0; i < cs->cdw; i++) { - fprintf(stderr, "[%4d] [%5d] 0x%08x\n", rscreen->cs_count, i, cs->buf[i]); - } - rscreen->cs_count++; - } -#endif - ctx->ws->cs_flush(ctx->rings.gfx.cs, flags); -#if R600_TRACE_CS - if (ctx->screen->trace_bo) { - struct r600_screen *rscreen = ctx->screen; - unsigned i; - - for (i = 0; i < 10; i++) { - usleep(5); - if (!ctx->ws->buffer_is_busy(rscreen->trace_bo->buf, RADEON_USAGE_READWRITE)) { - break; - } - } - if (i == 10) { - fprintf(stderr, "timeout on cs lockup likely happen at cs %d dw %d\n", - rscreen->trace_ptr[1], rscreen->trace_ptr[0]); - } else { - fprintf(stderr, "cs %d executed in %dms\n", rscreen->trace_ptr[1], i * 5); - } - } -#endif + ctx->ws->cs_flush(ctx->rings.gfx.cs, flags, ctx->screen->cs_count++); } void r600_begin_new_cs(struct r600_context *ctx) |