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>
This commit is contained in:
parent
abc9b3f575
commit
f785035d5b
|
|
@ -1625,7 +1625,9 @@ void sna_copy_fbcon(struct sna *sna)
|
|||
assert((sna->flags & SNA_IS_HOSTED) == 0);
|
||||
|
||||
priv = sna_pixmap(sna->front);
|
||||
assert(priv && priv->gpu_bo);
|
||||
assert(priv);
|
||||
if (priv->gpu_bo == NULL)
|
||||
return;
|
||||
|
||||
/* Scan the connectors for a framebuffer and assume that is the fbcon */
|
||||
VG_CLEAR(fbcon);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue