fix for i810 screen corruption in X

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

fix for i810 screen corruption in X

Matthieu Herrb
Hi,

Some users of systems with integrated Intel i8xx graphics cards havec
experimented screen corruption with X.Org 6.9, as shipped with OpenBSD
3.9. The following patch, from X.Org -current fixes the issue. Before
committing it to OpenBSD's XF4, I'd like to see it tested on a wide
range of systems using intel pci host bridges, not only intel integrated
graphics.

Apply in your XF4 source directory and run 'make build' here to rebuild
and install X with the patch.

Index: xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c
===================================================================
RCS file:
/cvs/OpenBSD/XF4/xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c,v
retrieving revision 1.5
diff -u -r1.5 xf86pciBus.c
--- xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c 15 Jan 2006
22:07:45 -0000 1.5
+++ xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c 27 Apr 2006
20:49:03 -0000
@@ -1800,7 +1800,16 @@
  PciBus->brfunc = pcrp->funcnum;

  PciBus->subclass = sub_class;
- PciBus->interface = pcrp->pci_prog_if;
+
+ /* The Intel bridges don't report as transparent
+   but guess what they are - from Linux kernel - airlied */
+ if ((pcrp->pci_vendor == PCI_VENDOR_INTEL) &&
+   ((pcrp->pci_device & 0xff00) == 0x2400)) {
+ xf86MsgVerb(X_INFO, 3, "Intel Bridge workaround enabled\n");
+ PciBus->interface = PCI_IF_BRIDGE_PCI_SUBTRACTIVE;
+ } else {
+ PciBus->interface = pcrp->pci_prog_if;
+ }

  if (pBusInfo && pBusInfo->funcs->pciControlBridge)
     PciBus->brcontrol =
Index: xc/programs/Xserver/hw/xfree86/os-support/shared/stdResource.c
===================================================================
RCS file:
/cvs/OpenBSD/XF4/xc/programs/Xserver/hw/xfree86/os-support/shared/stdResource.c,v
retrieving revision 1.2
diff -u -r1.2 stdResource.c
--- xc/programs/Xserver/hw/xfree86/os-support/shared/stdResource.c 15
Jan 2006 22:08:15 -0000 1.2
+++ xc/programs/Xserver/hw/xfree86/os-support/shared/stdResource.c 27
Apr 2006 20:49:03 -0000
@@ -150,10 +150,11 @@
      ret = xf86AddResToList(ret, &range, -1);
      RANGE(range, 0xfee00000, 0xfeefffff, ResExcMemBlock | ResBios);
      ret = xf86AddResToList(ret, &range, -1);
-#endif
+    /* airlied - remove BIOS range it shouldn't be here
+       this should use E820 - or THE OS */
      RANGE(range, 0xffe00000, 0xffffffff, ResExcMemBlock | ResBios);
      ret = xf86AddResToList(ret, &range, -1);
-
+#endif
      /*
       * Fallback would be to claim well known ports in the 0x0 - 0x3ff
range
       * along with their sparse I/O aliases, but that's too imprecise.
  Instead
--
Matthieu Herrb