[PATCH] drm: disable gem on i8xx

Kyle McMartin kyle at infradead.org
Mon Feb 9 03:18:14 UTC 2009


In an IRC conversation, you mentioned that GEM was not to be used on
8xx yet... But there didn't seem to be anything explicitly disabling
this. Add code to turn off GEM on i8xx series chips. This didn't turn
out to be the problem with X on my i830, but at least it kills the
lockdep warning.

Should this go upstream as well?

Signed-off-by: Kyle McMartin <kyle at redhat.com>

---
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index cc0adb4..9303063 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1108,8 +1108,8 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
 	/* don't enable GEM on PAE - needs agp + set_memory_* interface fixes */
 	dev_priv->has_gem = 0;
 #else
-	/* enable GEM by default */
-	dev_priv->has_gem = 1;
+	/* enable GEM by default, except on I8xx */
+	dev_priv->has_gem = !IS_I8XX(dev) ? 1 : 0;
 #endif
 
 	i915_gem_load(dev);
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index a70bf77..84664fe 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -750,6 +750,9 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
 #define IS_I855(dev) ((dev)->pci_device == 0x3582)
 #define IS_I865G(dev) ((dev)->pci_device == 0x2572)
 
+#define IS_I8XX(dev)	(IS_I830(dev) || IS_845G(dev) || IS_I85X(dev) ||	\
+				IS_I855(dev) || IS_I865G(dev))
+
 #define IS_I915G(dev) ((dev)->pci_device == 0x2582 || (dev)->pci_device == 0x258a)
 #define IS_I915GM(dev) ((dev)->pci_device == 0x2592)
 #define IS_I945G(dev) ((dev)->pci_device == 0x2772)




More information about the Fedora-kernel-list mailing list