mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
venus: vn_relax to abort on ring fatal status upon warn order
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21542>
This commit is contained in:
parent
adb51eeba5
commit
28bdf8db18
3 changed files with 15 additions and 1 deletions
|
|
@ -147,6 +147,11 @@ vn_relax(const struct vn_ring *ring, uint32_t *iter, const char *reason)
|
|||
if (unlikely(*iter % (1 << warn_order) == 0)) {
|
||||
vn_log(NULL, "stuck in %s wait with iter at %d", reason, *iter);
|
||||
|
||||
if (vn_ring_fatal(ring)) {
|
||||
vn_log(NULL, "aborting on ring fatal error");
|
||||
abort();
|
||||
}
|
||||
|
||||
if (*iter >= (1 << abort_order) && !VN_DEBUG(NO_ABORT)) {
|
||||
vn_log(NULL, "aborting");
|
||||
abort();
|
||||
|
|
|
|||
|
|
@ -30,10 +30,16 @@ vn_ring_store_tail(struct vn_ring *ring)
|
|||
static uint32_t
|
||||
vn_ring_load_status(const struct vn_ring *ring)
|
||||
{
|
||||
/* this must be called and ordered after vn_ring_store_tail */
|
||||
/* must be called and ordered after vn_ring_store_tail for idle status */
|
||||
return atomic_load_explicit(ring->shared.status, memory_order_seq_cst);
|
||||
}
|
||||
|
||||
bool
|
||||
vn_ring_fatal(const struct vn_ring *ring)
|
||||
{
|
||||
return vn_ring_load_status(ring) & VK_RING_STATUS_FATAL_BIT_MESA;
|
||||
}
|
||||
|
||||
static void
|
||||
vn_ring_write_buffer(struct vn_ring *ring, const void *data, uint32_t size)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -98,4 +98,7 @@ vn_ring_submit(struct vn_ring *ring,
|
|||
void
|
||||
vn_ring_wait(const struct vn_ring *ring, uint32_t seqno);
|
||||
|
||||
bool
|
||||
vn_ring_fatal(const struct vn_ring *ring);
|
||||
|
||||
#endif /* VN_RING_H */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue