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: uao_create takes...



details:   https://anonhg.NetBSD.org/src/rev/6988daba0d57
branches:  trunk
changeset: 1028458:6988daba0d57
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 11:05:48 2021 +0000

description:
drm/ttm: uao_create takes pages, not bytes.

diffstat:

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

diffs (27 lines):

diff -r 5bd656cf0df5 -r 6988daba0d57 sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c
--- a/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c       Sun Dec 19 11:05:40 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c       Sun Dec 19 11:05:48 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ttm_tt.c,v 1.15 2021/12/19 09:58:15 riastradh Exp $    */
+/*     $NetBSD: ttm_tt.c,v 1.16 2021/12/19 11:05:48 riastradh Exp $    */
 
 /* SPDX-License-Identifier: GPL-2.0 OR MIT */
 /**************************************************************************
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ttm_tt.c,v 1.15 2021/12/19 09:58:15 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ttm_tt.c,v 1.16 2021/12/19 11:05:48 riastradh Exp $");
 
 #define pr_fmt(fmt) "[TTM] " fmt
 
@@ -249,7 +249,7 @@
        WARN(bo->num_pages == 0,
            "zero-size allocation in %s, please file a NetBSD PR",
            __func__);  /* paranoia -- can't prove in five minutes */
-       ttm->swap_storage = uao_create(MAX(1, bo->num_pages), 0);
+       ttm->swap_storage = uao_create(PAGE_SIZE * MAX(1, bo->num_pages), 0);
        uao_set_pgfl(ttm->swap_storage, bus_dmamem_pgfl(ttm->bdev->dmat));
        TAILQ_INIT(&ttm->pglist);
 #else



Home | Main Index | Thread Index | Old Index