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 do a struct mutex we can ...



details:   https://anonhg.NetBSD.org/src/rev/1c84e99b20ed
branches:  trunk
changeset: 1028258:1c84e99b20ed
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 09:57:25 2021 +0000

description:
do a struct mutex we can digest, use more specific header than drmP


Author: Maya Rashish <maya%NetBSD.org@localhost>

diffstat:

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

diffs (47 lines):

diff -r febd1c9d1f49 -r 1c84e99b20ed sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c
--- a/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c       Sun Dec 19 09:57:17 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c       Sun Dec 19 09:57:25 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ttm_bo.c,v 1.22 2021/12/19 09:57:17 riastradh Exp $    */
+/*     $NetBSD: ttm_bo.c,v 1.23 2021/12/19 09:57:25 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.22 2021/12/19 09:57:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ttm_bo.c,v 1.23 2021/12/19 09:57:25 riastradh Exp $");
 
 #define pr_fmt(fmt) "[TTM] " fmt
 
@@ -42,7 +42,7 @@
 #include <uvm/uvm_object.h>
 #endif
 
-#include <drm/drmP.h>
+#include <drm/drm_prime.h>
 #include <drm/ttm/ttm_module.h>
 #include <drm/ttm/ttm_bo_driver.h>
 #include <drm/ttm/ttm_placement.h>
@@ -61,7 +61,7 @@
 static void ttm_bo_global_kobj_release(struct kobject *kobj);
 #endif
 
-#ifndef __NetBSD__             /* XXX sysfs */
+#ifdef __linux__               /* XXX sysfs */
 /**
  * ttm_global_mutex - protecting the global BO state
  */
@@ -74,6 +74,10 @@
        .name = "bo_count",
        .mode = S_IRUGO
 };
+#else
+static struct mutex ttm_global_mutex;
+unsigned ttm_bo_glob_use_count;
+struct ttm_bo_global ttm_bo_glob;
 #endif
 
 /* default destructor */



Home | Main Index | Thread Index | Old Index