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 i...



details:   https://anonhg.NetBSD.org/src/rev/e5de109375c5
branches:  trunk
changeset: 1028579:e5de109375c5
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 11:22:08 2021 +0000

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

Needs to match conditional destruction.


Author: Maya Rashish <maya%NetBSD.org@localhost>
Committer: Taylor R Campbell <riastradh%NetBSD.org@localhost>

diffstat:

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

diffs (28 lines):

diff -r 6c2a8d91f78b -r e5de109375c5 sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c
--- a/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c  Sun Dec 19 11:22:00 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo_util.c  Sun Dec 19 11:22:08 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ttm_bo_util.c,v 1.25 2021/12/19 10:47:30 riastradh Exp $       */
+/*     $NetBSD: ttm_bo_util.c,v 1.26 2021/12/19 11:22:08 riastradh Exp $       */
 
 /* SPDX-License-Identifier: GPL-2.0 OR MIT */
 /**************************************************************************
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ttm_bo_util.c,v 1.25 2021/12/19 10:47:30 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ttm_bo_util.c,v 1.26 2021/12/19 11:22:08 riastradh Exp $");
 
 #include <drm/ttm/ttm_bo_driver.h>
 #include <drm/ttm/ttm_placement.h>
@@ -567,7 +567,8 @@
        INIT_LIST_HEAD(&fbo->base.io_reserve_lru);
        fbo->base.moving = NULL;
 #ifdef __NetBSD__
-       drm_vma_node_init(&fbo->base.base.vma_node);
+       if (!ttm_bo_uses_embedded_gem_object(bo))
+               drm_vma_node_init(&fbo->base.base.vma_node);
        uvm_obj_init(&fbo->base.uvmobj, bo->bdev->driver->ttm_uvm_ops, true, 1);
        rw_obj_hold(bo->uvmobj.vmobjlock);
        uvm_obj_setlock(&fbo->base.uvmobj, bo->uvmobj.vmobjlock);



Home | Main Index | Thread Index | Old Index