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/gem i915: Don't need obj...



details:   https://anonhg.NetBSD.org/src/rev/ab923424dc2a
branches:  trunk
changeset: 1028851:ab923424dc2a
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 12:12:31 2021 +0000

description:
i915: Don't need obj->mmo.lock on destruction.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_object.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r 8face69988c3 -r ab923424dc2a sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_object.c
--- a/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_object.c Sun Dec 19 12:12:23 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_object.c Sun Dec 19 12:12:31 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_gem_object.c,v 1.8 2021/12/19 11:58:57 riastradh Exp $    */
+/*     $NetBSD: i915_gem_object.c,v 1.9 2021/12/19 12:12:31 riastradh Exp $    */
 
 /*
  * Copyright © 2017 Intel Corporation
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem_object.c,v 1.8 2021/12/19 11:58:57 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem_object.c,v 1.9 2021/12/19 12:12:31 riastradh Exp $");
 
 #include <linux/bitmap.h>
 #include <linux/sched/mm.h>
@@ -131,7 +131,6 @@
        }
        i915_gem_object_unlock(obj);
 
-       spin_lock(&obj->mmo.lock);
 #ifdef __NetBSD__
        __USE(mn);
        for (enum i915_mmap_type t = 0; t < I915_MMAP_NTYPES; t++) {
@@ -140,10 +139,11 @@
                drm_vma_node_revoke(&mmo->vma_node, file);
        }
 #else
+       spin_lock(&obj->mmo.lock);
        rbtree_postorder_for_each_entry_safe(mmo, mn, &obj->mmo.offsets, offset)
                drm_vma_node_revoke(&mmo->vma_node, file);
+       spin_unlock(&obj->mmo.lock);
 #endif
-       spin_unlock(&obj->mmo.lock);
 
        list_for_each_entry_safe(lut, ln, &close, obj_link) {
                struct i915_gem_context *ctx = lut->ctx;



Home | Main Index | Thread Index | Old Index