Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7]: src/sys/external/bsd/drm2/dist/drm/i915 Pull up following rev...



details:   https://anonhg.NetBSD.org/src/rev/1b3e1c711102
branches:  netbsd-7
changeset: 798361:1b3e1c711102
user:      snj <snj%NetBSD.org@localhost>
date:      Sun Sep 21 18:12:18 2014 +0000

description:
Pull up following revision(s) (requested by riastradh in ticket #99):
        sys/external/bsd/drm2/dist/drm/i915/i915_irq.c: revision 1.8
Fix two mistakes in previous.
- i915_error_wake_up is given irq_lock, so it need not take that.
- Unlock irq_lock on exit from i915_hangcheck_elapsed if ring_hung.
XXX This introduces the lock order irq_lock -> pending_flip_lock.
How about just using irq_lock for pending flips?

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/i915_irq.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 470885d6858b -r 1b3e1c711102 sys/external/bsd/drm2/dist/drm/i915/i915_irq.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_irq.c    Sun Sep 21 18:11:37 2014 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_irq.c    Sun Sep 21 18:12:18 2014 +0000
@@ -2138,11 +2138,10 @@
         * a gpu reset pending so that i915_error_work_func can acquire them).
         */
 
+       assert_spin_locked(&dev_priv->irq_lock);
 #ifdef __NetBSD__
-       spin_lock(&dev_priv->irq_lock);
        for_each_ring(ring, dev_priv, i)
                DRM_SPIN_WAKEUP_ALL(&ring->irq_queue, &dev_priv->irq_lock);
-       spin_unlock(&dev_priv->irq_lock);
 
        spin_lock(&dev_priv->pending_flip_lock);
        DRM_SPIN_WAKEUP_ALL(&dev_priv->pending_flip_queue,
@@ -2851,8 +2850,11 @@
                }
        }
 
-       if (rings_hung)
-               return i915_handle_error(dev, true, "Ring hung");
+       if (rings_hung) {
+               i915_handle_error(dev, true, "Ring hung");
+               spin_unlock(&dev_priv->irq_lock);
+               return;
+       }
 
        spin_unlock(&dev_priv->irq_lock);
 



Home | Main Index | Thread Index | Old Index