[PATCH] Do check that XV is enabled before calling xf86InitFBManagerLinear.

JM Ibanez jm at orangeandbronze.com
Fri Apr 13 07:25:32 PDT 2007


The driver segfaults when XV is turned off but LinearAlloc is set in
xorg.conf, due to the assumption made here. ->xaa_linear is set in
i830_memory.c only if Xv is enabled; however, this only checks if
LinearAlloc has been set (and not whether Xv is enabled). This commit
also checks if XV is enabled before proceeding.
---
 src/i830_driver.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/i830_driver.c b/src/i830_driver.c
index f0ca973..cddefe9 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -2545,7 +2545,7 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 		       "Failed to init memory manager\n");
 	 }
 
-	 if (pI830->LinearAlloc &&
+	 if (pI830->XvEnabled && pI830->LinearAlloc &&
 	     xf86InitFBManagerLinear(pScreen,
 				     pI830->xaa_linear->offset / pI830->cpp,
 				     pI830->xaa_linear->size / pI830->cpp))
-- 
1.5.0.5




More information about the xorg mailing list