[PATCH] support i945G as i915G

Christopher Allen Wing wingc at engin.umich.edu
Tue May 17 16:59:29 PDT 2005


I am testing an Intel based x86_64 machine with an integrated i945G
graphics controller. It seems to work properly with the i810 driver, if
you patch it to treat the chip the same as the i915G. I built the 6.8.2
release with a patch similar to this one and everything worked properly,
including OpenGL. (once similar changes were made to the i915 DRI/DRM)


Is anyone looking at supporting these newer Intel chips in the future, or
is a patch like this okay?



Thanks,

Chris Wing
wingc at engin.umich.edu


diff -uNr xc.orig/programs/Xserver/hw/xfree86/drivers/i810/common.h xc/programs/Xserver/hw/xfree86/drivers/i810/common.h
--- xc.orig/programs/Xserver/hw/xfree86/drivers/i810/common.h	2005-01-06 09:43:14.000000000 -0500
+++ xc/programs/Xserver/hw/xfree86/drivers/i810/common.h	2005-05-17 17:34:59.057060424 -0400
@@ -310,6 +310,11 @@
 #define PCI_CHIP_I915_GM_BRIDGE	   0x2590
 #endif

+#ifndef PCI_CHIP_I945_G
+#define PCI_CHIP_I945_G		   0x2772
+#define PCI_CHIP_I945_G_BRIDGE	   0x2770
+#endif
+
 #define IS_I810(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I810 ||	\
 			pI810->PciInfo->chipType == PCI_CHIP_I810_DC100 || \
 			pI810->PciInfo->chipType == PCI_CHIP_I810_E)
@@ -318,7 +323,8 @@
 #define IS_845G(pI810) (pI810->PciInfo->chipType == PCI_CHIP_845_G)
 #define IS_I85X(pI810)  (pI810->PciInfo->chipType == PCI_CHIP_I855_GM)
 #define IS_I865G(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I865_G)
-#define IS_I915G(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I915_G)
+#define IS_I915G(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I915_G ||	\
+			 pI810->PciInfo->chipType == PCI_CHIP_I945_G)
 #define IS_I915GM(pI810) (pI810->PciInfo->chipType == PCI_CHIP_I915_GM)

 #define IS_MOBILE(pI810) (IS_I830(pI810) || IS_I85X(pI810) || IS_I915GM(pI810))
diff -uNr xc.orig/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c
--- xc.orig/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c	2005-04-20 08:25:27.000000000 -0400
+++ xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c	2005-05-17 17:35:39.425923424 -0400
@@ -130,6 +130,7 @@
    {PCI_CHIP_I865_G,		"865G"},
    {PCI_CHIP_I915_G,		"915G"},
    {PCI_CHIP_I915_GM,		"915GM"},
+   {PCI_CHIP_I945_G,		"945G"},
    {-1,				NULL}
 };

@@ -146,6 +147,7 @@
    {PCI_CHIP_I865_G,		PCI_CHIP_I865_G,	RES_SHARED_VGA},
    {PCI_CHIP_I915_G,		PCI_CHIP_I915_G,	RES_SHARED_VGA},
    {PCI_CHIP_I915_GM,		PCI_CHIP_I915_GM,	RES_SHARED_VGA},
+   {PCI_CHIP_I945_G,		PCI_CHIP_I945_G,	RES_SHARED_VGA},
    {-1,				-1, RES_UNDEFINED }
 };

@@ -563,6 +565,7 @@
 	    case PCI_CHIP_I855_GM:
 	    case PCI_CHIP_I915_G:
 	    case PCI_CHIP_I915_GM:
+	    case PCI_CHIP_I945_G:
     	       xf86SetEntitySharable(usedChips[i]);

     	       /* Allocate an entity private if necessary */
diff -uNr xc.orig/programs/Xserver/hw/xfree86/drivers/i810/i830_driver.c xc/programs/Xserver/hw/xfree86/drivers/i810/i830_driver.c
--- xc.orig/programs/Xserver/hw/xfree86/drivers/i810/i830_driver.c	2005-04-20 08:25:28.000000000 -0400
+++ xc/programs/Xserver/hw/xfree86/drivers/i810/i830_driver.c	2005-05-17 17:36:19.671805120 -0400
@@ -186,6 +186,7 @@
    {PCI_CHIP_I865_G,		"865G"},
    {PCI_CHIP_I915_G,		"915G"},
    {PCI_CHIP_I915_GM,		"915GM"},
+   {PCI_CHIP_I945_G,		"945G"},
    {-1,				NULL}
 };

@@ -196,6 +197,7 @@
    {PCI_CHIP_I865_G,		PCI_CHIP_I865_G,	RES_SHARED_VGA},
    {PCI_CHIP_I915_G,		PCI_CHIP_I915_G,	RES_SHARED_VGA},
    {PCI_CHIP_I915_GM,		PCI_CHIP_I915_GM,	RES_SHARED_VGA},
+   {PCI_CHIP_I945_G,		PCI_CHIP_I945_G,	RES_SHARED_VGA},
    {-1,				-1,			RES_UNDEFINED}
 };

@@ -1875,6 +1877,9 @@
    case PCI_CHIP_I915_GM:
       chipname = "915GM";
       break;
+   case PCI_CHIP_I945_G:
+      chipname = "945G";
+      break;
    default:
       chipname = "unknown chipset";
       break;



More information about the xorg mailing list