Logo Search packages:      
Sourcecode: kde-guidance version File versions  Download package

def displayconfigabstraction::XSetup::_isNVidiaCardDualhead (   self,
  PCIDeviceObject 
) [private]

PCIDevice - ScanPCI.PCIDevice

Returns true if the given nVidia PCI device ID supports dualhead.

Definition at line 520 of file displayconfigabstraction.py.

00520                                                    :
        """
        PCIDevice - ScanPCI.PCIDevice
        
        Returns true if the given nVidia PCI device ID supports dualhead.
        """
        # From Xorg source xc/programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c
        # See line "pNv->twoHeads = "
        #
        NV_ARCH_04 = 0x4
        NV_ARCH_10 = 0x10
        NV_ARCH_20 = 0x20
        NV_ARCH_30 = 0x30
        NV_ARCH_40 = 0x40
        
        pci_device = PCIDeviceObject.device
        
        if pci_device & 0xfff0 == 0x00f0:
            return True # FIXME PCIXpress chipsets 
            
        # These IDs come from the Xorg source. 
        # xc/programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c
        # And should be periodically updated.
        chipset = pci_device & 0x0ff0
        if chipset in [
                0x0100, # GeForce 256
                0x0110, # GeForce2 MX
                0x0150, # GeForce2
                0x0170, # GeForce4 MX
                0x0180, # GeForce4 MX (8x AGP)
                0x01A0, # nForce
                0x01F0]:# nForce2
            architecture = NV_ARCH_10
        elif chipset in [
                0x0200, # GeForce3
                0x0250, # GeForce4 Ti
                0x0280]:# GeForce4 Ti (8x AGP)
            architecture = NV_ARCH_20
        elif chipset in [
                0x0300, # GeForceFX 5800
                0x0310, # GeForceFX 5600
                0x0320, # GeForceFX 5200
                0x0330, # GeForceFX 5900
                0x0340]:# GeForceFX 5700
            architecture = NV_ARCH_30
        elif chipset in [
                0x0040,
                0x00C0,
                0x0120,
                0x0130,
                0x0140,
                0x0160,
                0x01D0,
                0x0090,
                0x0210,
                0x0220,
                0x0230,
                0x0290,
                0x0390]:
            architecture = NV_ARCH_40
        else:
            architecture = NV_ARCH_04
       
        return (architecture >= NV_ARCH_10) and \
                     (chipset != 0x0100) and \
                     (chipset != 0x0150) and \
                     (chipset != 0x01A0) and \
                     (chipset != 0x0200)
        
    def _syncXorgConfig(self):


Generated by  Doxygen 1.6.0   Back to index