xf86-video-intel: src/sna/sna_driver.c

Chris Wilson ickle at kemper.freedesktop.org
Tue Nov 8 02:25:42 PST 2011


 src/sna/sna_driver.c |   27 +++++++++++++++++++++++----
 1 file changed, 23 insertions(+), 4 deletions(-)

New commits:
commit 7577d6ea45794b83d2f84b175d453d8a460b0e9b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Nov 8 10:24:34 2011 +0000

    sna: Add some error messages to explain why we failed to create the screen
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index 9e49361..98819f6 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -192,21 +192,40 @@ static Bool sna_create_screen_resources(ScreenPtr screen)
 					  screen->height,
 					  screen->rootDepth,
 					  SNA_CREATE_FB);
-	if (!sna->front)
+	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);
+
 		return FALSE;
+	}
 
-	if (!sna_pixmap_force_to_gpu(sna->front))
+	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;
 


More information about the xorg-commit mailing list