[Intel-gfx] [PATCH] Disable DRI2 if we're running on shadowfb

Julien Cristau jcristau at debian.org
Wed Sep 22 13:47:27 CEST 2010


Without this change, DRI2 gets enabled but doesn't work and glxinfo
crashes my X server.

Signed-off-by: Julien Cristau <jcristau at debian.org>
---
 src/intel_driver.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/intel_driver.c b/src/intel_driver.c
index c0ad69e..ad90174 100644
--- a/src/intel_driver.c
+++ b/src/intel_driver.c
@@ -830,12 +830,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr screen, int argc, char **argv)
 
 	scrn->videoRam = device->regions[fb_bar].size / 1024;
 
-#ifdef DRI2
-	if (intel->directRenderingType == DRI_NONE
-	    && I830DRI2ScreenInit(screen))
-		intel->directRenderingType = DRI_DRI2;
-#endif
-
 	intel->force_fallback = FALSE;
 	intel->use_shadow = FALSE;
 
@@ -859,8 +853,15 @@ I830ScreenInit(int scrnIndex, ScreenPtr screen, int argc, char **argv)
 		xf86DrvMsg(scrn->scrnIndex, X_CONFIG,
 			   "Shadow buffer enabled,"
 			   " GPU acceleration disabled.\n");
+		intel->directRenderingType = DRI_DISABLED;
 	}
 
+#ifdef DRI2
+	if (intel->directRenderingType == DRI_NONE
+	    && I830DRI2ScreenInit(screen))
+		intel->directRenderingType = DRI_DRI2;
+#endif
+
 	/* SwapBuffers delays to avoid tearing */
 	intel->swapbuffers_wait = TRUE;
 
-- 
1.7.1




More information about the Intel-gfx mailing list