summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2010-09-21 23:05:42 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2010-09-21 23:05:42 +0000
commite082dcfb96c6577633f47f5cde1d3d7bbe0029c5 (patch)
tree71da3e862ee1e308cd635edfdeb89214233ac7d3 /sys/dev/pci
parentdcbf6f08d21800ea0a48b1e649b31031f0663b32 (diff)
In i915_gem_idle, don't fail if we have a wedged chipset (this only
happens when waiting for the gpu), the reset function will at the very least clean out all of our unwanted buffers, which is all we wanted to do here ourselves. so we can continue with disabling the hardware and cleaning up then return success. Fixes a QUIESCE crash for krw when he had a wedged gpu (``it works, ok krw@''). matthew@ hit a similar thing and this should fix it.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/drm/i915_drv.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c
index 58e6e11e0e3..737564eb6aa 100644
--- a/sys/dev/pci/drm/i915_drv.c
+++ b/sys/dev/pci/drm/i915_drv.c
@@ -3927,10 +3927,12 @@ i915_gem_idle(struct inteldrm_softc *dev_priv)
}
/*
- * If we're wedged, the workq will clear everything, else this will
- * empty out the lists for us.
+ * To idle the gpu, flush anything pending then unbind the whole
+ * shebang. If we're wedged, assume that the reset workq will clear
+ * everything out and continue as normal.
*/
- if ((ret = i915_gem_evict_everything(dev_priv, 1)) != 0 && ret != ENOSPC) {
+ if ((ret = i915_gem_evict_everything(dev_priv, 1)) != 0 &&
+ ret != ENOSPC && ret != EIO) {
DRM_UNLOCK();
return (ret);
}