Module: Mesa
Branch: master
Commit: 02bcb443ee39cec1b61e5ba3e466471f3668f536
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=02bcb443ee39cec1b61e5ba3e466471f3668f536

Author: Eric Anholt <e...@anholt.net>
Date:   Fri Dec 11 19:06:09 2015 -0800

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-sta...@lists.freedesktop.org>

---

 src/gallium/drivers/vc4/vc4_job.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/vc4/vc4_job.c 
b/src/gallium/drivers/vc4/vc4_job.c
index 79bf2c4..78a66cc 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;
                 }
         }
 

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to