summaryrefslogtreecommitdiff
path: root/src/sna/sna_driver.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-09-26 21:01:43 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-09-26 21:01:43 +0100
commitf785035d5bd42a778d4be0bf3ff8678bd7a7e503 (patch)
tree0f73608053b64f993c74b0e57147625e0a402768 /src/sna/sna_driver.c
parentabc9b3f5753d602da296d50c8769cefb88ec473d (diff)
sna: Allow move-to-gpu to fail during ScreenCreateResources
Before we attach the Screen Pixmap to the scanout, we will have to create a GPU bo and apply any fixups as required. Therefore failing to pre-emptively move it during ScreenCreateResource is not fatal and the failure can be simply ignored. Suggested-by: Egbert Eich <eich@freedesktop.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_driver.c')
-rw-r--r--src/sna/sna_driver.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index 7eed2143..14b9c318 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -248,15 +248,11 @@ static Bool sna_create_screen_resources(ScreenPtr screen)
return FALSE;
}
- if (!sna_pixmap_force_to_gpu(new_front, MOVE_READ)) {
- xf86DrvMsg(screen->myNum, X_ERROR,
- "[intel] Failed to allocate video resources for front buffer %dx%d at depth %d\n",
- screen->width,
- screen->height,
- screen->rootDepth);
- screen->DestroyPixmap(new_front);
- return FALSE;
- }
+ /* Prefer to use the GPU for rendering into the eventual scanout
+ * bo so that we do not unduly stall when it is time to attach
+ * it to the CRTCs.
+ */
+ sna_pixmap_force_to_gpu(new_front, MOVE_READ | __MOVE_SCANOUT);
screen->SetScreenPixmap(new_front);
assert(screen->GetScreenPixmap(screen) == new_front);