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/ttm drm/ttm: Conditionalize d...



details:   https://anonhg.NetBSD.org/src/rev/92367896a51d
branches:  trunk
changeset: 1028572:92367896a51d
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 11:21:12 2021 +0000

description:
drm/ttm: Conditionalize destruction of vma node.

Needs to match conditional initialization.

diffstat:

 sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r d342a2c0344d -r 92367896a51d sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c
--- a/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c       Sun Dec 19 11:21:03 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c       Sun Dec 19 11:21:12 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ttm_bo.c,v 1.27 2021/12/19 11:09:02 riastradh Exp $    */
+/*     $NetBSD: ttm_bo.c,v 1.28 2021/12/19 11:21:12 riastradh Exp $    */
 
 /* SPDX-License-Identifier: GPL-2.0 OR MIT */
 /**************************************************************************
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ttm_bo.c,v 1.27 2021/12/19 11:09:02 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ttm_bo.c,v 1.28 2021/12/19 11:21:12 riastradh Exp $");
 
 #define pr_fmt(fmt) "[TTM] " fmt
 
@@ -685,7 +685,8 @@
 #endif
        drm_vma_offset_remove(bdev->vma_manager, &bo->base.vma_node);
 #ifdef __NetBSD__
-       drm_vma_node_destroy(&bo->base.vma_node);
+       if (!ttm_bo_uses_embedded_gem_object(bo))
+               drm_vma_node_destroy(&bo->base.vma_node);
 #endif
        ttm_mem_io_lock(man, false);
        ttm_mem_io_free_vm(bo);



Home | Main Index | Thread Index | Old Index