Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/i915 i915: Defer final wakeup...



details:   https://anonhg.NetBSD.org/src/rev/442055ef3921
branches:  trunk
changeset: 361572:442055ef3921
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Feb 14 20:37:51 2022 +0000

description:
i915: Defer final wakeup on active until after retirement.

Not sure what I was thinking when I moved this earlier!

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/i915_active.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r 145adaf4d4e0 -r 442055ef3921 sys/external/bsd/drm2/dist/drm/i915/i915_active.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_active.c Mon Feb 14 19:13:04 2022 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_active.c Mon Feb 14 20:37:51 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_active.c,v 1.10 2021/12/24 00:14:03 riastradh Exp $       */
+/*     $NetBSD: i915_active.c,v 1.11 2022/02/14 20:37:51 riastradh Exp $       */
 
 /*
  * SPDX-License-Identifier: MIT
@@ -7,7 +7,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_active.c,v 1.10 2021/12/24 00:14:03 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_active.c,v 1.11 2022/02/14 20:37:51 riastradh Exp $");
 
 #include <linux/debugobjects.h>
 
@@ -195,8 +195,6 @@
 #endif
        ref->cache = NULL;
 
-       DRM_SPIN_WAKEUP_ALL(&ref->tree_wq, &ref->tree_lock);
-
        spin_unlock_irqrestore(&ref->tree_lock, flags);
 
        /* After the final retire, the entire struct may be freed */
@@ -204,6 +202,9 @@
                ref->retire(ref);
 
        /* ... except if you wait on it, you must manage your own references! */
+       spin_lock(&ref->tree_lock);
+       DRM_SPIN_WAKEUP_ALL(&ref->tree_wq, &ref->tree_lock);
+       spin_unlock(&ref->tree_lock);
 
        rbtree_postorder_for_each_entry_safe(it, n, &root, node) {
                GEM_BUG_ON(i915_active_fence_isset(&it->base));



Home | Main Index | Thread Index | Old Index