mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-14 09:40:19 +01:00
panvk/utrace: Make indirect capture wait optional
Unless the command we're tracing produces the data we want to capture, there is no need to wait for its timestamp write. Currently, there is no such case, so make it the responsibility of the caller instead of implicitly adding the wait. Also remove and unnecessary wait for the LS scoreboard after the copy buffer store. Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36519>
This commit is contained in:
parent
abffb96c46
commit
c2e0ce16fb
2 changed files with 7 additions and 7 deletions
|
|
@ -34,12 +34,12 @@ cmd_write_timestamp(const struct panvk_device *dev, struct cs_builder *b,
|
|||
|
||||
static void
|
||||
cmd_copy_data(struct cs_builder *b, uint64_t dst_addr, uint64_t src_addr,
|
||||
uint32_t size)
|
||||
uint32_t size, bool wait_for_timestamp)
|
||||
{
|
||||
assert((dst_addr | src_addr | size) % sizeof(uint32_t) == 0);
|
||||
|
||||
/* wait for timestamp writes */
|
||||
cs_wait_slot(b, SB_ID(DEFERRED_SYNC));
|
||||
if (wait_for_timestamp)
|
||||
cs_wait_slot(b, SB_ID(DEFERRED_SYNC));
|
||||
|
||||
/* Depending on where this is called from, we could potentially use SR
|
||||
* registers or copy with a compute job.
|
||||
|
|
@ -72,8 +72,6 @@ cmd_copy_data(struct cs_builder *b, uint64_t dst_addr, uint64_t src_addr,
|
|||
src_addr += offset;
|
||||
size -= offset;
|
||||
}
|
||||
|
||||
cs_wait_slot(b, SB_ID(LS));
|
||||
}
|
||||
|
||||
static struct cs_builder *
|
||||
|
|
@ -117,7 +115,8 @@ panvk_utrace_capture_data(struct u_trace *ut, void *cs, void *dst_buffer,
|
|||
/* src_offset_B is absolute */
|
||||
assert(!src_buffer);
|
||||
|
||||
cmd_copy_data(b, dst_addr, src_addr, size_B);
|
||||
cmd_copy_data(b, dst_addr, src_addr, size_B,
|
||||
cs_info->capture_data_wait_for_ts);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -149,7 +148,7 @@ panvk_per_arch(utrace_copy_buffer)(struct u_trace_context *utctx,
|
|||
const uint64_t src_addr = src_bo->addr.dev + from_offset;
|
||||
const uint64_t dst_addr = dst_bo->addr.dev + to_offset;
|
||||
|
||||
cmd_copy_data(b, dst_addr, src_addr, size_B);
|
||||
cmd_copy_data(b, dst_addr, src_addr, size_B, false);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ struct panvk_cmd_buffer;
|
|||
struct panvk_utrace_cs_info {
|
||||
struct panvk_cmd_buffer *cmdbuf;
|
||||
struct cs_async_op *ts_async_op;
|
||||
bool capture_data_wait_for_ts;
|
||||
};
|
||||
|
||||
void panvk_per_arch(utrace_context_init)(struct panvk_device *dev);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue