[Mesa-dev] [PATCH] intel: Add more sandybridge device ids.

Robert Hooker sarvatt at ubuntu.com
Wed Sep 22 14:28:50 PDT 2010


From: Robert Hooker <robert.hooker at canonical.com>

This prevents failures like this when using one of these devices:

Unrecognized deviceID 116
X Error of failed request:  BadAlloc (insufficient resources for operation)
  Major opcode of failed request:  155 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Serial number of failed request:  21
  Current serial number in output stream:  24

The full list of new id's was obtained from commit 53767cc0d0a58d36cd445d
in xf86-video-intel.

Signed-off-by: Robert Hooker <robert.hooker at canonical.com>
---
 src/mesa/drivers/dri/intel/intel_chipset.h |   20 ++++++++++++++------
 src/mesa/drivers/dri/intel/intel_context.c |   11 +++++++++++
 2 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_chipset.h b/src/mesa/drivers/dri/intel/intel_chipset.h
index b5f180b..b17e608 100644
--- a/src/mesa/drivers/dri/intel/intel_chipset.h
+++ b/src/mesa/drivers/dri/intel/intel_chipset.h
@@ -71,9 +71,13 @@
 #define PCI_CHIP_ILD_G                  0x0042
 #define PCI_CHIP_ILM_G                  0x0046
 
-#define PCI_CHIP_SANDYBRIDGE		0x0102
-#define PCI_CHIP_SANDYBRIDGE_M		0x0106
-#define PCI_CHIP_SANDYBRIDGE_M_D0	0x0126
+#define PCI_CHIP_SANDYBRIDGE_GT1		0x0102
+#define PCI_CHIP_SANDYBRIDGE_GT2		0x0112
+#define PCI_CHIP_SANDYBRIDGE_GT2_PLUS		0x0122
+#define PCI_CHIP_SANDYBRIDGE_M_GT1		0x0106
+#define PCI_CHIP_SANDYBRIDGE_M_GT2		0x0116
+#define PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS	0x0126
+#define PCI_CHIP_SANDYBRIDGE_S_GT		0x010A
 
 #define IS_MOBILE(devid)	(devid == PCI_CHIP_I855_GM || \
 				 devid == PCI_CHIP_I915_GM || \
@@ -119,9 +123,13 @@
 /* Compat macro for intel_decode.c */
 #define IS_IRONLAKE(devid)	IS_GEN5(devid)
 
-#define IS_GEN6(devid)		(devid == PCI_CHIP_SANDYBRIDGE || \
-				 devid == PCI_CHIP_SANDYBRIDGE_M || \
-				 devid == PCI_CHIP_SANDYBRIDGE_M_D0)
+#define IS_GEN6(devid)		(devid == PCI_CHIP_SANDYBRIDGE_GT1 || \
+				 devid == PCI_CHIP_SANDYBRIDGE_GT2 || \
+				 devid == PCI_CHIP_SANDYBRIDGE_GT2_PLUS || \
+				 devid == PCI_CHIP_SANDYBRIDGE_M_GT1 || \
+				 devid == PCI_CHIP_SANDYBRIDGE_M_GT2 || \
+				 devid == PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS || \
+				 devid == PCI_CHIP_SANDYBRIDGE_S_GT)
 
 #define IS_965(devid)		(IS_GEN4(devid) || \
 				 IS_G4X(devid) || \
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 109c670..a12e90a 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -163,6 +163,17 @@ intelGetString(GLcontext * ctx, GLenum name)
       case PCI_CHIP_ILM_G:
          chipset = "Intel(R) Ironlake Mobile";
          break;
+      case PCI_CHIP_SANDYBRIDGE_GT1:
+      case PCI_CHIP_SANDYBRIDGE_GT2:
+      case PCI_CHIP_SANDYBRIDGE_GT2_PLUS:
+      case PCI_CHIP_SANDYBRIDGE_S_GT:
+         chipset = "Intel(R) Sandybridge Desktop";
+         break;
+      case PCI_CHIP_SANDYBRIDGE_M_GT1:
+      case PCI_CHIP_SANDYBRIDGE_M_GT2:
+      case PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS:
+         chipset = "Intel(R) Sandybridge Mobile";
+         break;
       default:
          chipset = "Unknown Intel Chipset";
          break;
-- 
1.7.2



More information about the mesa-dev mailing list