Commit 15ddfa3b authored by Dave Jones's avatar Dave Jones

Merge tetrachloride.(none):/mnt/raid/src/kernel/2.5/bk-linus

into tetrachloride.(none):/mnt/raid/src/kernel/2.5/agpgart
parents b9d6ea3c 6ce6d295
...@@ -342,6 +342,14 @@ static struct pci_device_id agp_amdk8_pci_table[] __initdata = { ...@@ -342,6 +342,14 @@ static struct pci_device_id agp_amdk8_pci_table[] __initdata = {
.subvendor = PCI_ANY_ID, .subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID, .subdevice = PCI_ANY_ID,
}, },
{
.class = (PCI_CLASS_BRIDGE_HOST << 8),
.class_mask = ~0,
.vendor = PCI_VENDOR_ID_SI,
.device = PCI_DEVICE_ID_SI_755,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
},
{ } { }
}; };
......
...@@ -345,13 +345,29 @@ static struct agp_device_ids via_agp_device_ids[] __initdata = ...@@ -345,13 +345,29 @@ static struct agp_device_ids via_agp_device_ids[] __initdata =
{ }, /* dummy final entry, always present */ { }, /* dummy final entry, always present */
}; };
/*
* VIA's AGP3 chipsets do magick to put the AGP bridge compliant
* with the same standards version as the graphics card.
*/
static void check_via_agp3 (struct agp_bridge_data *bridge)
{
u8 reg;
pci_read_config_byte(bridge->dev, VIA_AGPSEL, &reg);
/* Check AGP 2.0 compatibility mode. */
if ((reg & (1<<1))==0)
bridge->driver = &via_agp3_driver;
}
static int __init agp_via_probe(struct pci_dev *pdev, static int __init agp_via_probe(struct pci_dev *pdev,
const struct pci_device_id *ent) const struct pci_device_id *ent)
{ {
struct agp_device_ids *devs = via_agp_device_ids; struct agp_device_ids *devs = via_agp_device_ids;
struct agp_bridge_data *bridge; struct agp_bridge_data *bridge;
int j = 0; int j = 0;
u8 cap_ptr, reg; u8 cap_ptr;
cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP); cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP);
if (!cap_ptr) if (!cap_ptr)
...@@ -382,40 +398,25 @@ static int __init agp_via_probe(struct pci_dev *pdev, ...@@ -382,40 +398,25 @@ static int __init agp_via_probe(struct pci_dev *pdev,
if (!bridge) if (!bridge)
return -ENOMEM; return -ENOMEM;
get_agp_version(bridge);
bridge->dev = pdev; bridge->dev = pdev;
bridge->capndx = cap_ptr; bridge->capndx = cap_ptr;
bridge->driver = &via_driver; bridge->driver = &via_driver;
switch (pdev->device) {
case PCI_DEVICE_ID_VIA_8367_0:
/* /*
* Garg, there are KT400s with KT266 IDs. * Garg, there are KT400s with KT266 IDs.
*/ */
if (pdev->device == PCI_DEVICE_ID_VIA_8367_0) {
/* Is there a KT400 subsystem ? */ /* Is there a KT400 subsystem ? */
if (pdev->subsystem_device != PCI_DEVICE_ID_VIA_8377_0) if (pdev->subsystem_device == PCI_DEVICE_ID_VIA_8377_0) {
break;
printk(KERN_INFO PFX "Found KT400 in disguise as a KT266.\n"); printk(KERN_INFO PFX "Found KT400 in disguise as a KT266.\n");
/*FALLTHROUGH*/ check_via_agp3(bridge);
case PCI_DEVICE_ID_VIA_8377_0:
/*
* The KT400 does magick to put the AGP bridge compliant
* with the same standards version as the graphics card.
*/
pci_read_config_byte(pdev, VIA_AGPSEL, &reg);
/* Check AGP 2.0 compatibility mode. */
if ((reg & (1<<1))==0) {
bridge->driver = &via_agp3_driver;
break;
} }
/*FALLTHROUGH*/
default:
break;
} }
/* If this is an AGP3 bridge, check which mode its in and adjust. */
bridge->dev = pdev; if (bridge->major_version >= 3)
bridge->capndx = cap_ptr; check_via_agp3(bridge);
/* Fill in the mode register */ /* Fill in the mode register */
pci_read_config_dword(pdev, pci_read_config_dword(pdev,
......
...@@ -571,6 +571,7 @@ ...@@ -571,6 +571,7 @@
#define PCI_DEVICE_ID_SI_750 0x0750 #define PCI_DEVICE_ID_SI_750 0x0750
#define PCI_DEVICE_ID_SI_751 0x0751 #define PCI_DEVICE_ID_SI_751 0x0751
#define PCI_DEVICE_ID_SI_752 0x0752 #define PCI_DEVICE_ID_SI_752 0x0752
#define PCI_DEVICE_ID_SI_755 0x0755
#define PCI_DEVICE_ID_SI_900 0x0900 #define PCI_DEVICE_ID_SI_900 0x0900
#define PCI_DEVICE_ID_SI_961 0x0961 #define PCI_DEVICE_ID_SI_961 0x0961
#define PCI_DEVICE_ID_SI_962 0x0962 #define PCI_DEVICE_ID_SI_962 0x0962
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment