From a0cdd9d5ed1c99b295fd35488556c2735289c1da Mon Sep 17 00:00:00 2001 From: Asahi Lina Date: Thu, 11 Jul 2024 18:17:07 +0900 Subject: [PATCH] asahi: Add more batch debug Signed-off-by: Asahi Lina Part-of: --- src/gallium/drivers/asahi/agx_batch.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/asahi/agx_batch.c b/src/gallium/drivers/asahi/agx_batch.c index d7f898451a7..d640c16e259 100644 --- a/src/gallium/drivers/asahi/agx_batch.c +++ b/src/gallium/drivers/asahi/agx_batch.c @@ -823,9 +823,11 @@ agx_batch_submit(struct agx_context *ctx, struct agx_batch *batch, * wait on these using their syncobj. */ uint64_t writer = p_atomic_read_relaxed(&bo->writer); - if (writer && agx_bo_writer_queue(writer) != ctx->queue_id) { - batch_debug(batch, "Waits on inter-context BO @ 0x%" PRIx64, - bo->ptr.gpu); + uint32_t queue_id = agx_bo_writer_queue(writer); + if (writer && queue_id != ctx->queue_id) { + batch_debug( + batch, "Waits on inter-context BO @ 0x%" PRIx64 " from queue %u", + bo->ptr.gpu, queue_id); agx_add_sync(in_syncs, &in_sync_count, agx_bo_writer_syncobj(writer)); @@ -956,6 +958,7 @@ agx_batch_submit(struct agx_context *ctx, struct agx_batch *batch, /* But any BOs written by active batches are ours */ assert(writer == batch && "exclusive writer"); p_atomic_set(&bo->writer, agx_bo_writer(ctx->queue_id, batch->syncobj)); + batch_debug(batch, "Writes to BO @ 0x%" PRIx64, bo->ptr.gpu); } free(in_syncs);