[PATCH 2.6.12-rc4] support i945G as i915G in intel-agp.c

From: Christopher Allen Wing
Date: Tue May 17 2005 - 16:03:38 EST


I am currently testing a x86_64 machine with an Intel i945G chipset. The
intel-agp.c driver seems to work okay if I treat it as a i915G. (I can get
OpenGL to work with the DRI driver)

Is someone else (with documentation perhaps) looking into the newer Intel
chipsets, or is a patch like this okay?


Thanks,

Chris Wing
wingc@xxxxxxxxxxxxxxx



diff -uNr linux-2.6.12-rc4.orig/drivers/char/agp/intel-agp.c linux-2.6.12-rc4/drivers/char/agp/intel-agp.c
--- linux-2.6.12-rc4.orig/drivers/char/agp/intel-agp.c 2005-05-07 01:20:31.000000000 -0400
+++ linux-2.6.12-rc4/drivers/char/agp/intel-agp.c 2005-05-17 16:56:26.763582464 -0400
@@ -418,7 +418,8 @@
case I915_GMCH_GMS_STOLEN_48M:
/* Check it's really I915G */
if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915G_HB ||
- agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB)
+ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB ||
+ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945G_HB)
gtt_entries = MB(48) - KB(size);
else
gtt_entries = 0;
@@ -426,7 +427,8 @@
case I915_GMCH_GMS_STOLEN_64M:
/* Check it's really I915G */
if (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915G_HB ||
- agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB)
+ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB ||
+ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945G_HB)
gtt_entries = MB(64) - KB(size);
else
gtt_entries = 0;
@@ -1662,6 +1664,14 @@
}
name = "915GM";
break;
+ case PCI_DEVICE_ID_INTEL_82945G_HB:
+ if (find_i830(PCI_DEVICE_ID_INTEL_82945G_IG)) {
+ bridge->driver = &intel_915_driver;
+ } else {
+ bridge->driver = &intel_845_driver;
+ }
+ name = "945G";
+ break;
case PCI_DEVICE_ID_INTEL_7505_0:
bridge->driver = &intel_7505_driver;
name = "E7505";
@@ -1801,6 +1811,7 @@
ID(PCI_DEVICE_ID_INTEL_7205_0),
ID(PCI_DEVICE_ID_INTEL_82915G_HB),
ID(PCI_DEVICE_ID_INTEL_82915GM_HB),
+ ID(PCI_DEVICE_ID_INTEL_82945G_HB),
{ }
};

diff -uNr linux-2.6.12-rc4.orig/include/linux/pci_ids.h linux-2.6.12-rc4/include/linux/pci_ids.h
--- linux-2.6.12-rc4.orig/include/linux/pci_ids.h 2005-05-07 01:20:31.000000000 -0400
+++ linux-2.6.12-rc4/include/linux/pci_ids.h 2005-05-17 16:53:54.000000000 -0400
@@ -2412,6 +2412,8 @@
#define PCI_DEVICE_ID_INTEL_ESB2_16 0x269a
#define PCI_DEVICE_ID_INTEL_ESB2_17 0x269b
#define PCI_DEVICE_ID_INTEL_ESB2_18 0x269e
+#define PCI_DEVICE_ID_INTEL_82945G_HB 0x2770
+#define PCI_DEVICE_ID_INTEL_82945G_IG 0x2772
#define PCI_DEVICE_ID_INTEL_ICH7_0 0x27b8
#define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b9
#define PCI_DEVICE_ID_INTEL_ICH7_2 0x27c0
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/