diff options
author | Keith Packard <keithp@keithp.com> | 2008-12-15 15:49:01 -0800 |
---|---|---|
committer | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2009-01-07 18:51:34 +0800 |
commit | 3b03f200d3f8a8f3c3bbdd4f1ca6d8f98d754936 (patch) | |
tree | 94f6df00c865fb7ad921ebd58a1cae582e956533 | |
parent | a6fda34a12292a415f89a97d70f74c51d729b659 (diff) |
FatalError on batchbuffer map failure
Yes, it would be nice to do something other than crash here.
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 7736b65be4fb4d5c59d7aedb1e64da976bb10ae9)
-rw-r--r-- | src/i830_batchbuffer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/i830_batchbuffer.c b/src/i830_batchbuffer.c index 13d939e6..b1c8a8de 100644 --- a/src/i830_batchbuffer.c +++ b/src/i830_batchbuffer.c @@ -112,7 +112,9 @@ intel_next_batch(ScrnInfoPtr pScrn) else pI830->batch_bo = dri_bo_alloc(pI830->bufmgr, "batch", 4096 * 4, 4096); - dri_bo_map(pI830->batch_bo, 1); + if (dri_bo_map(pI830->batch_bo, 1) != 0) + FatalError("Failed to map batchbuffer: %s\n", strerror(errno)); + pI830->batch_used = 0; pI830->batch_ptr = pI830->batch_bo->virtual; } |