This patch fixes a segfault on LynxE chipsets and any other chipset where IOBase is NULL:
Program received signal SIGSEGV, Segmentation fault. 0x0ea165aa in SMILynx_OutputDetect_crt (output=0x7c2ed580) at /usr/xenocara/driver/xf86-video-siliconmotion/src/smilynx_output.c:215 215 status = MMIO_IN8(pSmi->IOBase, 0x3C2) & 0x10; (gdb) bt #0 0x0ea165aa in SMILynx_OutputDetect_crt (output=0x7c2ed580) at /usr/xenocara/driver/xf86-video-siliconmotion/src/smilynx_output.c:215 #1 0x1c0af811 in xf86ProbeOutputModes (scrn=0x883d9800, maxX=4096, maxY=4096) at /usr/xenocara/xserver/hw/xfree86/modes/xf86Crtc.c:1426 #2 0x1c0b0e5d in xf86InitialConfiguration (scrn=0x883d9800, canGrow=0) at /usr/xenocara/xserver/hw/xfree86/modes/xf86Crtc.c:2091 #3 0x0ea0bb97 in SMI_PreInit (pScrn=0x883d9800, flags=0) at /usr/xenocara/driver/xf86-video-siliconmotion/src/smi_driver.c:935 #4 0x1c063ad0 in InitOutput (pScreenInfo=0x3c04b020, argc=1, argv=0xcfbdc508) at /usr/xenocara/xserver/hw/xfree86/common/xf86Init.c:962 #5 0x1c021778 in main (argc=1, argv=0xcfbdc508, envp=0xcfbdc510) at /usr/xenocara/xserver/dix/main.c:358 (gdb) quit -- Matthieu Herrb
commit eae511c0a4679653bfe9c9be5cd237ff6a75bfbe Author: Matthieu Herrb <[email protected]> Date: Fri Mar 13 21:19:16 2009 +0100 Fix direct access to IO space on chipsets with no IOBase mapping. diff --git a/src/smilynx_output.c b/src/smilynx_output.c index fefa8c5..6c08003 100644 --- a/src/smilynx_output.c +++ b/src/smilynx_output.c @@ -220,7 +220,7 @@ SMILynx_OutputDetect_crt(xf86OutputPtr output) while (!(hwp->readST01(hwp) & 0x8)) ; while (hwp->readST01(hwp) & 0x8) ; - status = MMIO_IN8(pSmi->IOBase, 0x3C2) & 0x10; + status = VGAIN8(pSmi->IOBase, 0x3C2) & 0x10; /* Restore previous state */ VGAOUT8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0x21, mode->SR21);
_______________________________________________ xorg-devel mailing list [email protected] http://lists.x.org/mailman/listinfo/xorg-devel
