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/nouveau Add needful includes ...



details:   https://anonhg.NetBSD.org/src/rev/0fa88d80662e
branches:  trunk
changeset: 992731:0fa88d80662e
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 07:37:38 2018 +0000

description:
Add needful includes and fix device resource addr/size API.

diffstat:

 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_ttm.c |  16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diffs (43 lines):

diff -r 38b579f4a929 -r 0fa88d80662e sys/external/bsd/drm2/dist/drm/nouveau/nouveau_ttm.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_ttm.c      Mon Aug 27 07:37:28 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_ttm.c      Mon Aug 27 07:37:38 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nouveau_ttm.c,v 1.5 2018/08/27 04:58:24 riastradh Exp $        */
+/*     $NetBSD: nouveau_ttm.c,v 1.6 2018/08/27 07:37:38 riastradh Exp $        */
 
 /*
  * Copyright (c) 2007-2008 Tungsten Graphics, Inc., Cedar Park, TX., USA,
@@ -27,7 +27,10 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_ttm.c,v 1.5 2018/08/27 04:58:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_ttm.c,v 1.6 2018/08/27 07:37:38 riastradh Exp $");
+
+#include <sys/param.h>
+#include <uvm/uvm_extern.h>    /* pmap_pv_track/untrack */
 
 #include "nouveau_drm.h"
 #include "nouveau_ttm.h"
@@ -451,8 +454,8 @@
                                         device->func->resource_size(device, 1));
 
 #ifdef __NetBSD__
-       pmap_pv_track(nv_device_resource_start(device, 1),
-           nv_device_resource_len(device, 1));
+       pmap_pv_track(device->func->resource_addr(device, 1),
+           device->func->resource_size(device, 1));
 #endif
 
        /* GART init */
@@ -488,7 +491,8 @@
        drm->ttm.mtrr = 0;
 
 #ifdef __NetBSD__
-       pmap_pv_untrack(nv_device_resource_start(nv_device(drm->device), 1),
-           nv_device_resource_len(nv_device(drm->device), 1));
+       struct nvkm_device *device = nvxx_device(&drm->device);
+       pmap_pv_untrack(device->func->resource_addr(device, 1),
+           device->func->resource_size(device, 1));
 #endif
 }



Home | Main Index | Thread Index | Old Index