diff mbox

drm/i915: Disable the BLT on pre-production SNB hardware

Message ID 1341528580-31291-1-git-send-email-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson July 5, 2012, 10:49 p.m. UTC
It never quite worked despite the numerous workarounds, yet I still see
people trying to use this hardware and filing bug reports. As we no
longer even try to implement the workarounds, since 6a233c78878
(drm/i915/ringbuffer: kill snb blt workaround), simply disable the ring.

v2: Add a message to inform the user about the limited capabilities of
their pre-production hardware.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem.c |   18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

Comments

Eric Anholt July 9, 2012, 4:39 p.m. UTC | #1
Chris Wilson <chris@chris-wilson.co.uk> writes:

> It never quite worked despite the numerous workarounds, yet I still see
> people trying to use this hardware and filing bug reports. As we no
> longer even try to implement the workarounds, since 6a233c78878
> (drm/i915/ringbuffer: kill snb blt workaround), simply disable the ring.
>
> v2: Add a message to inform the user about the limited capabilities of
> their pre-production hardware.

Where by "performance will be degraded" we mean "GL won't work".  :)

Still, better than just trying to blindly continue on.

Reviewed-by: Eric Anholt <eric@anholt.net>
Daniel Vetter July 9, 2012, 6:05 p.m. UTC | #2
On Mon, Jul 09, 2012 at 09:39:38AM -0700, Eric Anholt wrote:
> Chris Wilson <chris@chris-wilson.co.uk> writes:
> 
> > It never quite worked despite the numerous workarounds, yet I still see
> > people trying to use this hardware and filing bug reports. As we no
> > longer even try to implement the workarounds, since 6a233c78878
> > (drm/i915/ringbuffer: kill snb blt workaround), simply disable the ring.
> >
> > v2: Add a message to inform the user about the limited capabilities of
> > their pre-production hardware.
> 
> Where by "performance will be degraded" we mean "GL won't work".  :)
> 
> Still, better than just trying to blindly continue on.
> 
> Reviewed-by: Eric Anholt <eric@anholt.net>
Queued for -next, thanks for the patch.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 3afba9d..db438f0 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3739,6 +3739,22 @@  void i915_gem_init_ppgtt(struct drm_device *dev)
 	}
 }
 
+static bool
+intel_enable_blt(struct drm_device *dev)
+{
+	if (!HAS_BLT(dev))
+		return false;
+
+	/* The blitter was dysfunctional on early prototypes */
+	if (IS_GEN6(dev) && dev->pdev->revision < 8) {
+		DRM_INFO("BLT not supported on this pre-production hardware;"
+			 " graphics performance will be degraded.\n");
+		return false;
+	}
+
+	return true;
+}
+
 int
 i915_gem_init_hw(struct drm_device *dev)
 {
@@ -3762,7 +3778,7 @@  i915_gem_init_hw(struct drm_device *dev)
 			goto cleanup_render_ring;
 	}
 
-	if (HAS_BLT(dev)) {
+	if (intel_enable_blt(dev)) {
 		ret = intel_init_blt_ring_buffer(dev);
 		if (ret)
 			goto cleanup_bsd_ring;