panfrost: Bubble up errors

Instead of punting to PAN_MESA_DEBUG=msgs, which we can now remove.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11074>
This commit is contained in:
Alyssa Rosenzweig 2021-05-20 19:12:13 -04:00 committed by Marge Bot
parent ff3e54b432
commit 71f069bd7a
3 changed files with 9 additions and 10 deletions

View file

@ -879,12 +879,8 @@ panfrost_batch_submit_ioctl(struct panfrost_batch *batch,
ret = drmIoctl(dev->fd, DRM_IOCTL_PANFROST_SUBMIT, &submit);
free(bo_handles);
if (ret) {
if (dev->debug & PAN_DBG_MSGS)
fprintf(stderr, "Error submitting: %m\n");
if (ret)
return errno;
}
/* Trace the job if we're doing that */
if (dev->debug & (PAN_DBG_TRACE | PAN_DBG_SYNC)) {
@ -927,7 +923,9 @@ panfrost_batch_submit_jobs(struct panfrost_batch *batch,
if (has_draws) {
ret = panfrost_batch_submit_ioctl(batch, batch->scoreboard.first_job,
0, in_sync, has_frag ? 0 : out_sync);
assert(!ret);
if (ret)
goto done;
}
if (has_frag) {
@ -942,9 +940,11 @@ panfrost_batch_submit_jobs(struct panfrost_batch *batch,
ret = panfrost_batch_submit_ioctl(batch, fragjob,
PANFROST_JD_REQ_FS, 0,
out_sync);
assert(!ret);
if (ret)
goto done;
}
done:
if (has_tiler)
pthread_mutex_unlock(&dev->submit_lock);
@ -992,7 +992,7 @@ panfrost_batch_submit(struct panfrost_batch *batch,
ret = panfrost_batch_submit_jobs(batch, &fb, in_sync, out_sync);
if (ret && dev->debug & PAN_DBG_MSGS)
if (ret)
fprintf(stderr, "panfrost_batch_submit failed: %d\n", ret);
/* We must reset the damage info of our render targets here even

View file

@ -58,7 +58,6 @@
#include "panfrost-quirks.h"
static const struct debug_named_value panfrost_debug_options[] = {
{"msgs", PAN_DBG_MSGS, "Print debug messages"},
{"trace", PAN_DBG_TRACE, "Trace the command stream"},
{"deqp", PAN_DBG_DEQP, "Hacks for dEQP"},
{"dirty", PAN_DBG_DIRTY, "Always re-emit all state"},

View file

@ -28,7 +28,7 @@
#ifndef PAN_UTIL_H
#define PAN_UTIL_H
#define PAN_DBG_MSGS 0x0001
/* 0x0001 unused */
#define PAN_DBG_TRACE 0x0002
#define PAN_DBG_DEQP 0x0004
#define PAN_DBG_DIRTY 0x0008