On Wednesday 06 February 2002 11:25, Andris Pavenis wrote:
> I can reliably crash XFree86-4.2.0 on Pentium III machine with i810
> integrated video when KDE-3.0 beta2 (built from CVS) is installed:
KDE-3.0-rc1 now crashes XFree86 on VT switching ALWAYS (for me)
with XFree86-4.2
I810Sync() is called when switched away from X11 (I810LeaveVT() called before
that). It doesn't seem to happen if I'm using Gnome-1.4 and happened much
more seldom with KDE-2.2.2. Tried to add some protection against this (see
patch). It is rather ugly workaround, but it seems to avoid XFree86 lockup at
least in 24bpp mode (without disabling hardware acceleration).
Andris
>
> System information:
> Pentium III Copermine, 512Mb RAM, ASUS i810 motherboard, ...
> Linux kernel 2.4.18-pre8 (I got the same trouble with earlier kernels)
> XFree86-4.2.0 compiled with gcc-2.95.3 on the same machine from
> sources
>
Now 2.4.19-pre1-ac1
--- xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c~1 Fri Mar 8 11:07:16 2002
+++ xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c Mon Mar 11 12:01:57 2002
@@ -280,6 +280,10 @@
XF86ModuleData i810ModuleData = {&i810VersRec, i810Setup, 0};
+
+int I810_in_vt = 1;
+
+
static pointer
i810Setup(pointer module, pointer opts, int *errmaj, int *errmin)
{
@@ -2112,6 +2116,7 @@
if (!I810ModeInit(pScrn, pScrn->currentMode)) return FALSE;
I810AdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
+ I810_in_vt = 1;
return TRUE;
}
@@ -2140,9 +2145,12 @@
I810Restore(pScrn);
if (! I810UnbindGARTMemory(pScrn))
- return;
-
+ {
+ I810_in_vt = 0;
+ return;
+ }
vgaHWLock(hwp);
+ I810_in_vt = 0;
}
static Bool
--- xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h~1 Fri Mar 8 11:07:15 2002
+++ xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h Mon Mar 11 11:59:47 2002
@@ -812,6 +812,7 @@
#define IS_I815(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I815)
#define IS_I830(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I830_M)
+extern int I810_in_vt;
#endif
--- xc/programs/Xserver/hw/xfree86/drivers/i810/i810_accel.c~1 Fri Oct 5 02:27:25 2001
+++ xc/programs/Xserver/hw/xfree86/drivers/i810/i810_accel.c Mon Mar 11 12:00:15 2002
@@ -210,6 +210,8 @@
*/
I810SelectBuffer(pScrn, I810_FRONT);
+
+ I810_in_vt = 1;
return XAAInit(pScreen, infoPtr);
}
@@ -298,6 +300,11 @@
return;
}
#endif
+
+ if (I810_in_vt==0) {
+ ErrorF ("I810Sync() ignored\n");
+ return;
+ }
/* Send a flush instruction and then wait till the ring is empty.
* This is stronger than waiting for the blitter to finish as it also