summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-09-26 23:09:04 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-26 23:10:56 +0100
commit40c9d180bf43af84ae05d88e993deedf76e263e6 (patch)
treea7b68d7b84030682236ac9fc39a929a4e56dd0da
parent537e73f3f935b917f2f5f9b51499cb29d65e3889 (diff)
Retry framebuffer allocation if first attempt fails.
If we are tiled, we may fail the allocation due to an EIO and so not being able to set tiling. Try again with an untiled request in this case. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/intel_memory.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/intel_memory.c b/src/intel_memory.c
index 4f1b009b..3a25ba6a 100644
--- a/src/intel_memory.c
+++ b/src/intel_memory.c
@@ -209,6 +209,10 @@ retry:
width, height, intel->cpp,
&tiling_mode, &pitch, 0);
if (front_buffer == NULL) {
+ if (tiling_mode != I915_TILING_NONE) {
+ tiling_mode = I915_TILING_NONE;
+ goto retry;
+ }
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
"Failed to allocate framebuffer.\n");
return NULL;