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>
This commit is contained in:
Chris Wilson 2010-09-26 23:09:04 +01:00
parent 537e73f3f9
commit 40c9d180bf
1 changed files with 4 additions and 0 deletions

View File

@ -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;