diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-03-29 12:45:59 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-03-29 12:50:07 +0100 |
commit | b7bd1837ccc980666f5502fbd428d3a4be3cd26f (patch) | |
tree | 33889da2e438dbcec78e3135a48a6a8c4769b898 /lib/intel_batchbuffer.c | |
parent | 9dbce0991f4eb353ab892c88299bbebf2cb1a285 (diff) |
Make the assertions guarding syscalls (drmIoctl in particular) verbose
Currently all we see is gem_read: ret == 0 failed, where it would help
to see the errno and/or the ret.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib/intel_batchbuffer.c')
-rw-r--r-- | lib/intel_batchbuffer.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c index 518435cd..325066e8 100644 --- a/lib/intel_batchbuffer.c +++ b/lib/intel_batchbuffer.c @@ -32,6 +32,7 @@ #include <assert.h> #include "drm.h" +#include "drmtest.h" #include "intel_batchbuffer.h" #include "intel_bufmgr.h" #include "intel_chipset.h" @@ -78,7 +79,6 @@ void intel_batchbuffer_flush_on_ring(struct intel_batchbuffer *batch, int ring) { unsigned int used = batch->ptr - batch->buffer; - int ret; if (used == 0) return; @@ -101,13 +101,11 @@ intel_batchbuffer_flush_on_ring(struct intel_batchbuffer *batch, int ring) batch->ptr += 4; used = batch->ptr - batch->buffer; - ret = drm_intel_bo_subdata(batch->bo, 0, used, batch->buffer); - assert(ret == 0); + do_or_die(drm_intel_bo_subdata(batch->bo, 0, used, batch->buffer)); batch->ptr = NULL; - ret = drm_intel_bo_mrb_exec(batch->bo, used, NULL, 0, 0, ring); - assert(ret == 0); + do_or_die(drm_intel_bo_mrb_exec(batch->bo, used, NULL, 0, 0, ring)); intel_batchbuffer_reset(batch); } |