mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 15:40:11 +01:00
pan/decode: Fix job cycle detection
We need to look at the job header pointers themselves, not the memory objects
that contain them, because there can be (and usually is) multiple jobs per BO.
Fixes: 3da8c9193c ("panfrost: Handle Job VA cycles when decoding a dump file")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18539>
This commit is contained in:
parent
e2010e000b
commit
0971868b8b
1 changed files with 6 additions and 7 deletions
|
|
@ -1144,17 +1144,16 @@ GENX(pandecode_jc)(mali_ptr jc_gpu_va, unsigned gpu_id)
|
||||||
mali_ptr next_job = 0;
|
mali_ptr next_job = 0;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
struct pandecode_mapped_memory *mem =
|
struct mali_job_header_packed *hdr =
|
||||||
pandecode_find_mapped_gpu_mem_containing(jc_gpu_va);
|
PANDECODE_PTR(jc_gpu_va, struct mali_job_header_packed);
|
||||||
|
|
||||||
entry = _mesa_set_search(va_set, mem->addr);
|
entry = _mesa_set_search(va_set, hdr);
|
||||||
if (entry != NULL) {
|
if (entry != NULL) {
|
||||||
fprintf(stdout, "Job list has a cycle\n");
|
fprintf(stdout, "Job list has a cycle\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
pan_unpack(PANDECODE_PTR(jc_gpu_va, struct mali_job_header_packed),
|
pan_unpack(hdr, JOB_HEADER, h);
|
||||||
JOB_HEADER, h);
|
|
||||||
next_job = h.next;
|
next_job = h.next;
|
||||||
|
|
||||||
DUMP_UNPACKED(JOB_HEADER, h, "Job Header (%" PRIx64 "):\n", jc_gpu_va);
|
DUMP_UNPACKED(JOB_HEADER, h, "Job Header (%" PRIx64 "):\n", jc_gpu_va);
|
||||||
|
|
@ -1202,8 +1201,8 @@ GENX(pandecode_jc)(mali_ptr jc_gpu_va, unsigned gpu_id)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add the latest visited job GPU VA to avoid cycles */
|
/* Track the latest visited job CPU VA to detect cycles */
|
||||||
_mesa_set_add(va_set, mem->addr);
|
_mesa_set_add(va_set, hdr);
|
||||||
|
|
||||||
} while ((jc_gpu_va = next_job));
|
} while ((jc_gpu_va = next_job));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue