vga arbiter will be locked in one device while AbortDDX will call LeaveVT
routines from the other device. Fail!

Signed-off-by: Tiago Vignatti <[email protected]>
---

Keith, you might want to apply in 1.8 this one.

The stack is the following, where NVSync stays spinning forever:

 0xb72828f9 in NVSync (pScrn=0x9277910) at nv_xaa.c:287
 287     while(READ_GET(pNv) != pNv->dmaPut);
 (gdb) bt
 #0  0xb72828f9 in NVSync (pScrn=0x9277910) at nv_xaa.c:287
 #1  0xb72742a0 in NVLeaveVT (scrnIndex=0, flags=0) at nv_driver.c:1044
 #2  0xb602c11c in XAALeaveVT (index=0, flags=0) at xaaInit.c:534
 #3  0x081df8dd in xf86XVLeaveVT (index=0, flags=0) at xf86xv.c:1274
 #4  0x080c1f66 in AbortDDX () at xf86Init.c:1272
 #5  0x080b4429 in AbortServer () at log.c:418
 #6  0x080b484f in FatalError (
     f=0x8228c5c "AddScreen/ScreenInit failed for driver %d\n") at log.c:546
 #7  0x080c1b9d in InitOutput (pScreenInfo=0x82597e0, argc=6, argv=0xbf85fe74)
     at xf86Init.c:1072
 #8  0x08065363 in main (argc=6, argv=0xbf85fe74, envp=0xbf85fe90) at
 main.c:249


 hw/xfree86/common/xf86Init.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 72241a7..71ac9a9 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1269,7 +1269,9 @@ AbortDDX(void)
               * we might not have been wrapped yet. Therefore enable
               * screen explicitely.
               */
+             xf86VGAarbiterLock(xf86Screens[i]);
              (xf86Screens[i]->LeaveVT)(i, 0);
+             xf86VGAarbiterUnlock(xf86Screens[i]);
          }
   }
 
-- 
1.6.0.4

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to