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 Destroy some mutexes whe...



details:   https://anonhg.NetBSD.org/src/rev/588b7134b4bc
branches:  trunk
changeset: 1028296:588b7134b4bc
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 10:28:41 2021 +0000

description:
Destroy some mutexes when done.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_userptr.c |  5 +++--
 sys/external/bsd/drm2/dist/drm/i915/intel_memory_region.c  |  6 ++++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diffs (51 lines):

diff -r 0f4c3c2de5fb -r 588b7134b4bc sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_userptr.c
--- a/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_userptr.c        Sun Dec 19 10:28:31 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_userptr.c        Sun Dec 19 10:28:41 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_gem_userptr.c,v 1.2 2021/12/18 23:45:30 riastradh Exp $   */
+/*     $NetBSD: i915_gem_userptr.c,v 1.3 2021/12/19 10:28:41 riastradh Exp $   */
 
 /*
  * SPDX-License-Identifier: MIT
@@ -7,7 +7,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem_userptr.c,v 1.2 2021/12/18 23:45:30 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem_userptr.c,v 1.3 2021/12/19 10:28:41 riastradh Exp $");
 
 #include <linux/mmu_context.h>
 #include <linux/mmu_notifier.h>
@@ -844,4 +844,5 @@
 void i915_gem_cleanup_userptr(struct drm_i915_private *dev_priv)
 {
        destroy_workqueue(dev_priv->mm.userptr_wq);
+       mutex_destroy(&dev_priv->mm_lock);
 }
diff -r 0f4c3c2de5fb -r 588b7134b4bc sys/external/bsd/drm2/dist/drm/i915/intel_memory_region.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_memory_region.c Sun Dec 19 10:28:31 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_memory_region.c Sun Dec 19 10:28:41 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_memory_region.c,v 1.2 2021/12/18 23:45:28 riastradh Exp $        */
+/*     $NetBSD: intel_memory_region.c,v 1.3 2021/12/19 10:28:41 riastradh Exp $        */
 
 // SPDX-License-Identifier: MIT
 /*
@@ -6,7 +6,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_memory_region.c,v 1.2 2021/12/18 23:45:28 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_memory_region.c,v 1.3 2021/12/19 10:28:41 riastradh Exp $");
 
 #include "intel_memory_region.h"
 #include "i915_drv.h"
@@ -203,6 +203,8 @@
        return mem;
 
 err_free:
+       mutex_destroy(&mem->mm_lock);
+       mutex_destroy(&mem->objects.lock);
        kfree(mem);
        return ERR_PTR(err);
 }



Home | Main Index | Thread Index | Old Index