summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@home.osdl.org>2003-07-08 19:00:25 -0700
committerLinus Torvalds <torvalds@home.osdl.org>2003-07-08 19:00:25 -0700
commit85bce232bf44169f8110229ff5a238f5f41aff92 (patch)
tree37ef39f8b69086f7cf9f1c4355a112dbf56d88cd
parent3a185ec4544b1e487a156e97b5959f300bac130f (diff)
parent945735895c3a8c73ea40ef3f41955a415936553c (diff)
Merge bk://linux-dj.bkbits.net/agpgart
into home.osdl.org:/home/torvalds/v2.5/linux
-rw-r--r--drivers/char/agp/amd-k8-agp.c8
-rw-r--r--drivers/char/agp/via-agp.c55
-rw-r--r--include/linux/pci_ids.h1
3 files changed, 37 insertions, 27 deletions
diff --git a/drivers/char/agp/amd-k8-agp.c b/drivers/char/agp/amd-k8-agp.c
index 91492df0546b..c89c41cca857 100644
--- a/drivers/char/agp/amd-k8-agp.c
+++ b/drivers/char/agp/amd-k8-agp.c
@@ -342,6 +342,14 @@ static struct pci_device_id agp_amdk8_pci_table[] __initdata = {
.subvendor = 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,
+ },
{ }
};
diff --git a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c
index 9d0f14a70b48..06d3ffa396d4 100644
--- a/drivers/char/agp/via-agp.c
+++ b/drivers/char/agp/via-agp.c
@@ -345,13 +345,29 @@ static struct agp_device_ids via_agp_device_ids[] __initdata =
{ }, /* 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,
const struct pci_device_id *ent)
{
struct agp_device_ids *devs = via_agp_device_ids;
struct agp_bridge_data *bridge;
int j = 0;
- u8 cap_ptr, reg;
+ u8 cap_ptr;
cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP);
if (!cap_ptr)
@@ -386,36 +402,21 @@ found:
bridge->capndx = cap_ptr;
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 ? */
- if (pdev->subsystem_device != PCI_DEVICE_ID_VIA_8377_0)
- break;
-
- printk(KERN_INFO PFX "Found KT400 in disguise as a KT266.\n");
- /*FALLTHROUGH*/
- 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;
+ if (pdev->subsystem_device == PCI_DEVICE_ID_VIA_8377_0) {
+ printk(KERN_INFO PFX "Found KT400 in disguise as a KT266.\n");
+ check_via_agp3(bridge);
}
- /*FALLTHROUGH*/
- default:
- break;
}
-
- bridge->dev = pdev;
- bridge->capndx = cap_ptr;
+ /* If this is an AGP3 bridge, check which mode its in and adjust. */
+ get_agp_version(bridge);
+ if (bridge->major_version >= 3)
+ check_via_agp3(bridge);
/* Fill in the mode register */
pci_read_config_dword(pdev,
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 89311daf58bd..26a763bea787 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -571,6 +571,7 @@
#define PCI_DEVICE_ID_SI_750 0x0750
#define PCI_DEVICE_ID_SI_751 0x0751
#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_961 0x0961
#define PCI_DEVICE_ID_SI_962 0x0962