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 drm: Destroy struct drm_gem_o...



details:   https://anonhg.NetBSD.org/src/rev/8d7a7980d48e
branches:  trunk
changeset: 1028767:8d7a7980d48e
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 11:58:49 2021 +0000

description:
drm: Destroy struct drm_gem_object::vma_node after use.

diffstat:

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

diffs (62 lines):

diff -r a053317bf265 -r 8d7a7980d48e sys/external/bsd/drm2/dist/drm/drm_gem.c
--- a/sys/external/bsd/drm2/dist/drm/drm_gem.c  Sun Dec 19 11:58:41 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_gem.c  Sun Dec 19 11:58:49 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_gem.c,v 1.22 2021/12/19 11:32:53 riastradh Exp $   */
+/*     $NetBSD: drm_gem.c,v 1.23 2021/12/19 11:58:49 riastradh Exp $   */
 
 /*
  * Copyright © 2008 Intel Corporation
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_gem.c,v 1.22 2021/12/19 11:32:53 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_gem.c,v 1.23 2021/12/19 11:58:49 riastradh Exp $");
 
 #include <linux/types.h>
 #include <linux/slab.h>
@@ -1064,7 +1064,6 @@
 #endif
 
 #ifdef __NetBSD__
-       drm_vma_node_destroy(&obj->vma_node);
        if (obj->filp)
                uao_detach(obj->filp);
        uvm_obj_destroy(&obj->gemo_uvmobj, /*free lock*/true);
@@ -1075,6 +1074,9 @@
 
        dma_resv_fini(&obj->_resv);
        drm_gem_free_mmap_offset(obj);
+#ifdef __NetBSD__
+       drm_vma_node_destroy(&obj->vma_node);
+#endif
 }
 EXPORT_SYMBOL(drm_gem_object_release);
 
diff -r a053317bf265 -r 8d7a7980d48e 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 11:58:41 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_object.c Sun Dec 19 11:58:49 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_gem_object.c,v 1.6 2021/12/19 11:58:41 riastradh Exp $    */
+/*     $NetBSD: i915_gem_object.c,v 1.7 2021/12/19 11:58:50 riastradh Exp $    */
 
 /*
  * Copyright © 2017 Intel Corporation
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_gem_object.c,v 1.6 2021/12/19 11:58:41 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_gem_object.c,v 1.7 2021/12/19 11:58:50 riastradh Exp $");
 
 #include <linux/bitmap.h>
 #include <linux/sched/mm.h>
@@ -178,6 +178,7 @@
        struct drm_i915_private *i915 = to_i915(obj->base.dev);
 
        dma_resv_fini(&obj->base._resv);
+       drm_vma_node_destroy(&obj->base.vma_node);
        i915_gem_object_free(obj);
 
        GEM_BUG_ON(!atomic_read(&i915->mm.free_count));



Home | Main Index | Thread Index | Old Index