sna: Add some error messages to explain why we failed to create the screen

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-11-08 10:24:34 +00:00
parent 33256af40b
commit 7577d6ea45
1 changed files with 24 additions and 5 deletions

View File

@ -192,21 +192,40 @@ static Bool sna_create_screen_resources(ScreenPtr screen)
screen->height,
screen->rootDepth,
SNA_CREATE_FB);
if (!sna->front)
return FALSE;
if (!sna->front) {
xf86DrvMsg(screen->myNum, X_ERROR,
"[intel] Unable to create front buffer %dx%d at depth %d\n",
screen->width,
screen->height,
screen->rootDepth);
if (!sna_pixmap_force_to_gpu(sna->front))
return FALSE;
}
if (!sna_pixmap_force_to_gpu(sna->front)) {
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);
goto cleanup_front;
}
screen->SetScreenPixmap(sna->front);
if (!sna_accel_create(sna))
if (!sna_accel_create(sna)) {
xf86DrvMsg(screen->myNum, X_ERROR,
"[intel] Failed to initialise acceleration routines\n");
goto cleanup_front;
}
sna_copy_fbcon(sna);
if (!sna_enter_vt(screen->myNum, 0))
if (!sna_enter_vt(screen->myNum, 0)) {
xf86DrvMsg(screen->myNum, X_ERROR,
"[intel] Failed to become DRM master\n");
goto cleanup_front;
}
return TRUE;