summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroga <oga@openbsd.org>2010-09-21 23:05:41 +0000
committeroga <oga@openbsd.org>2010-09-21 23:05:41 +0000
commitfc70d36c9d17a992de90cfef0a15a92dcdb29465 (patch)
treebc51b6679f0a01066336fe71607a41455e5254e7
parentUse RING_WAIT state for the ringbuffer and the instdone debug register (diff)
downloadwireguard-openbsd-fc70d36c9d17a992de90cfef0a15a92dcdb29465.tar.xz
wireguard-openbsd-fc70d36c9d17a992de90cfef0a15a92dcdb29465.zip
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.
-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);
}