[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xfree-xpert
Subject:    [Xpert]xfree86 4.x + SB Live = conflict (X bug?)
From:       Steffen Pingel <steffenp () gmx ! de>
Date:       2001-06-13 22:12:05
[Download RAW message or body]

Hi,

a while ago somebody posted a bad hack to resolve an issue that comes up
with a few Creative SoundBlaster Live! cards. These cards promote
themselfs as "VGA compatible unclassified device". Details can be found
here:

http://www.xfree86.org/pipermail/xpert/2001-January/004547.html

This issue still remains unresolved with current XFree86 versions. I am
not sure if this is a XFree86 bug or if the hardware is faulty (or if
the Linux kernel gets the pci ids wrong). Maybe somebody can explain
what determines the pci class id?

Anyway XFree86 seems to confuse the soundblaster driver at some point of
initialization. I applied a patch that skips adding the card to the list
of video cards at FindPCIVideoInfo in
./xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c, since the card is
not a display adapter at all. 

This might only cure the symptoms and not the cause of the problem. I
still would like to figure out why XFree86 doesn't just leave the card
alone once it realizes that it is not a usable display adapter. Maybe
the the emu10k1 driver is buggy and should not get confused by XFree86
at all.

I'm currently running XFree86 4.0.99.900 on Debian GNU/Linux (sid) on
kernel 2.4.5-ac9. I encountered the problem with XFree86 4.0.1, 4.0.2
and kernel 2.2.18 as well.

The patch is against the current cvs tree.

Steffen

--
Steffen Pingel - steffenp@gmx.de -
http://members.tripod.de/SteffenPingel/


--- xc/programs/Xserver/hw/xfree86/common/xf86pciBus.c	Thu Jun 14
00:08:53 2001
+++ xc-sp/programs/Xserver/hw/xfree86/common/xf86pciBus.c	Thu Jun 14
00:05:56 2001
@@ -74,6 +74,15 @@
     (((b) == PCI_CLASS_PREHISTORIC && (s) ==
PCI_SUBCLASS_PREHISTORIC_VGA) || \
      ((b) == PCI_CLASS_DISPLAY && (s) == PCI_SUBCLASS_DISPLAY_VGA))
 
+/*
+ * Broken PCI cards that need to be skipped during FindPCIVideoInfo.
+ */
+#define PCI_VENDOR_ID_CREATIVE 0x1102
+#define PCI_DEVICE_ID_CREATIVE_EMU10K1 0x0002
+#define PCIBROKENCARD(v,i)			     			      \
+    (((v) == PCI_VENDOR_ID_CREATIVE) && ((i) ==
PCI_DEVICE_ID_CREATIVE_EMU10K1))
+
+
 #define PCI_MEM32_LENGTH_MAX 0xFFFFFFFF
 
 #undef MIN
@@ -149,8 +158,9 @@
 	    baseclass = pcrp->pci_base_class;
 	    subclass = pcrp->pci_sub_class;
 	}
-	
-	if (PCIINFOCLASSES(baseclass, subclass)) {
+
+	if ((PCIINFOCLASSES(baseclass, subclass)) 
+	    && (!PCIBROKENCARD(pcrp->pci_vendor, pcrp->pci_device))) {
 	    num++;
 	    xf86PciVideoInfo = xnfrealloc(xf86PciVideoInfo,
 					  sizeof(pciVideoPtr) * (num + 1));
_______________________________________________
Xpert mailing list
Xpert@XFree86.Org
http://XFree86.Org/mailman/listinfo/xpert

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic