summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2015-12-11 19:06:09 -0800
committerEmil Velikov <emil.l.velikov@gmail.com>2016-01-08 12:05:25 +0200
commitab0b96a939b8eb48f203b8726ca5440a593716da (patch)
treee555da7ad1dde9b216660ef519a57fd1a8ef03b7
parentd4474a96df7194250eeb071dcd7f91e1e7e4fcca (diff)
vc4: Warn instead of abort()ing on exec ioctl failures.
It's really harsh to abort() the X Server because of a momentary failure (particularly -ENOMEM). I don't see a way to pass an -ENOMEM up the stack from here, but we can at least log to stderr before proceeding on. Cc: "11.1" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 02bcb443ee39cec1b61e5ba3e466471f3668f536)
-rw-r--r--src/gallium/drivers/vc4/vc4_job.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/vc4/vc4_job.c b/src/gallium/drivers/vc4/vc4_job.c
index 79bf2c49ee..78a66cc231 100644
--- a/src/gallium/drivers/vc4/vc4_job.c
+++ b/src/gallium/drivers/vc4/vc4_job.c
@@ -240,9 +240,11 @@ vc4_job_submit(struct vc4_context *vc4)
#else
ret = vc4_simulator_flush(vc4, &submit);
#endif
- if (ret) {
- fprintf(stderr, "VC4 submit failed\n");
- abort();
+ static bool warned = false;
+ if (ret && !warned) {
+ fprintf(stderr, "Draw call returned %s. "
+ "Expect corruption.\n", strerror(errno));
+ warned = true;
}
}