mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
panfrost: Implement PAN_DBG_SYNC with pandecode/minimal
This way we avoid duplicating job traversal logic. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3836>
This commit is contained in:
parent
5998646125
commit
c46a090942
3 changed files with 8 additions and 25 deletions
|
|
@ -347,7 +347,7 @@ panfrost_bo_mmap(struct panfrost_bo *bo)
|
|||
}
|
||||
|
||||
/* Record the mmap if we're tracing */
|
||||
if (pan_debug & PAN_DBG_TRACE)
|
||||
if (pan_debug & (PAN_DBG_TRACE | PAN_DBG_SYNC))
|
||||
pandecode_inject_mmap(bo->gpu, bo->cpu, bo->size, NULL);
|
||||
}
|
||||
|
||||
|
|
@ -406,7 +406,7 @@ panfrost_bo_create(struct panfrost_screen *screen, size_t size,
|
|||
if (!(flags & (PAN_BO_INVISIBLE | PAN_BO_DELAY_MMAP)))
|
||||
panfrost_bo_mmap(bo);
|
||||
else if (flags & PAN_BO_INVISIBLE) {
|
||||
if (pan_debug & PAN_DBG_TRACE)
|
||||
if (pan_debug & (PAN_DBG_TRACE | PAN_DBG_SYNC))
|
||||
pandecode_inject_mmap(bo->gpu, NULL, bo->size, NULL);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -917,32 +917,15 @@ panfrost_batch_submit_ioctl(struct panfrost_batch *batch,
|
|||
return errno;
|
||||
}
|
||||
|
||||
if (pan_debug & PAN_DBG_SYNC) {
|
||||
u32 status;
|
||||
|
||||
/* Wait so we can get errors reported back */
|
||||
drmSyncobjWait(screen->fd, &batch->out_sync->syncobj, 1,
|
||||
INT64_MAX, 0, NULL);
|
||||
|
||||
status = header->exception_status;
|
||||
|
||||
if (status && status != 0x1) {
|
||||
DBG("Job %" PRIx64 " failed: source ID: 0x%x access: %s exception: 0x%x (exception_status 0x%x) fault_pointer 0x%" PRIx64 " \n",
|
||||
first_job_desc,
|
||||
(status >> 16) & 0xFFFF,
|
||||
pandecode_exception_access((status >> 8) & 0x3),
|
||||
status & 0xFF,
|
||||
status,
|
||||
header->fault_pointer);
|
||||
}
|
||||
}
|
||||
|
||||
/* Trace the job if we're doing that */
|
||||
if (pan_debug & PAN_DBG_TRACE) {
|
||||
if (pan_debug & (PAN_DBG_TRACE | PAN_DBG_SYNC)) {
|
||||
/* Wait so we can get errors reported back */
|
||||
drmSyncobjWait(screen->fd, &batch->out_sync->syncobj, 1,
|
||||
INT64_MAX, 0, NULL);
|
||||
pandecode_jc(submit.jc, FALSE, screen->gpu_id, false);
|
||||
|
||||
/* Trace gets priority over sync */
|
||||
bool minimal = !(pan_debug & PAN_DBG_TRACE);
|
||||
pandecode_jc(submit.jc, FALSE, screen->gpu_id, minimal);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -774,7 +774,7 @@ panfrost_create_screen(int fd, struct renderonly *ro)
|
|||
for (unsigned i = 0; i < ARRAY_SIZE(screen->bo_cache.buckets); ++i)
|
||||
list_inithead(&screen->bo_cache.buckets[i]);
|
||||
|
||||
if (pan_debug & PAN_DBG_TRACE)
|
||||
if (pan_debug & (PAN_DBG_TRACE | PAN_DBG_SYNC))
|
||||
pandecode_initialize();
|
||||
|
||||
screen->base.destroy = panfrost_destroy_screen;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue