diff options
author | 2012-05-21 20:14:18 +0000 | |
---|---|---|
committer | 2012-05-21 20:14:18 +0000 | |
commit | a7ed125247a65880d44d28522be37dcb2052f647 (patch) | |
tree | 712ab75578234ca11be7dbee0f9e4da9fb3a0dac | |
parent | Instead of passing stdin/stdout/stderr file descriptors over imsg and (diff) | |
download | wireguard-openbsd-a7ed125247a65880d44d28522be37dcb2052f647.tar.xz wireguard-openbsd-a7ed125247a65880d44d28522be37dcb2052f647.zip |
Always clear out the inactive list and make sure everything is unbound in
i915_gem_idle(). If we don't do that we end up with stale entries on the
inactive list which will panic the kernel the next time we use the list.
Fixes restarting X on Sandy Bridge.
-rw-r--r-- | sys/dev/pci/drm/i915_drv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c index 524bfcdfa66..6ed1ddf0ee0 100644 --- a/sys/dev/pci/drm/i915_drv.c +++ b/sys/dev/pci/drm/i915_drv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_drv.c,v 1.120 2012/05/19 18:02:53 kettenis Exp $ */ +/* $OpenBSD: i915_drv.c,v 1.121 2012/05/21 20:14:18 kettenis Exp $ */ /* * Copyright (c) 2008-2009 Owain G. Ainsworth <oga@openbsd.org> * @@ -3977,6 +3977,9 @@ i915_gem_idle(struct inteldrm_softc *dev_priv) DRM_LOCK(); if (dev_priv->mm.suspended || dev_priv->ring.ring_obj == NULL) { + KASSERT(TAILQ_EMPTY(&dev_priv->mm.flushing_list)); + KASSERT(TAILQ_EMPTY(&dev_priv->mm.active_list)); + (void)i915_gem_evict_inactive(dev_priv, 0); DRM_UNLOCK(); return (0); } |