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/ttm Don't call TTM functions that were...



details:   https://anonhg.NetBSD.org/src/rev/993799afc4e0
branches:  trunk
changeset: 1028259:993799afc4e0
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 09:57:33 2021 +0000

description:
Don't call TTM functions that were removed, try replacements


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

diffstat:

 sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c |  5 ++---
 sys/external/bsd/drm2/ttm/ttm_bo_vm.c       |  8 +++++---
 2 files changed, 7 insertions(+), 6 deletions(-)

diffs (55 lines):

diff -r 1c84e99b20ed -r 993799afc4e0 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:25 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c       Sun Dec 19 09:57:33 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ttm_bo.c,v 1.23 2021/12/19 09:57:25 riastradh Exp $    */
+/*     $NetBSD: ttm_bo.c,v 1.24 2021/12/19 09:57:33 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.23 2021/12/19 09:57:25 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ttm_bo.c,v 1.24 2021/12/19 09:57:33 riastradh Exp $");
 
 #define pr_fmt(fmt) "[TTM] " fmt
 
@@ -1646,7 +1646,6 @@
                goto out;
 
 #ifdef __NetBSD__
-       ttm_mem_unregister_shrink(glob->mem_glob, &glob->shrink);
        BUG_ON(glob->dummy_read_page != NULL);
        spin_lock_destroy(&glob->lru_lock);
        mutex_destroy(&ttm_global_mutex);
diff -r 1c84e99b20ed -r 993799afc4e0 sys/external/bsd/drm2/ttm/ttm_bo_vm.c
--- a/sys/external/bsd/drm2/ttm/ttm_bo_vm.c     Sun Dec 19 09:57:25 2021 +0000
+++ b/sys/external/bsd/drm2/ttm/ttm_bo_vm.c     Sun Dec 19 09:57:33 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ttm_bo_vm.c,v 1.16 2021/12/19 09:57:17 riastradh Exp $ */
+/*     $NetBSD: ttm_bo_vm.c,v 1.17 2021/12/19 09:57:33 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ttm_bo_vm.c,v 1.16 2021/12/19 09:57:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ttm_bo_vm.c,v 1.17 2021/12/19 09:57:33 riastradh Exp $");
 
 #include <sys/types.h>
 
@@ -110,7 +110,9 @@
                 * it, and start over.
                 */
                uvmfault_unlockall(ufi, ufi->entry->aref.ar_amap, NULL);
-               (void)ttm_bo_wait_unreserved(bo);
+               if (!dma_resv_lock_interruptible(bo->base.resv, NULL))
+                       dma_resv_unlock(bo->base.resv);
+
                return ERESTART;
        }
 



Home | Main Index | Thread Index | Old Index