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/nvkm/subdev/instmem D...



details:   https://anonhg.NetBSD.org/src/rev/477f3841b960
branches:  trunk
changeset: 835347:477f3841b960
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 14:18:18 2018 +0000

description:
Don't forget to add the base address.

diffstat:

 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_nv50.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r 9b007effa897 -r 477f3841b960 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_nv50.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_nv50.c     Mon Aug 27 14:18:04 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_nv50.c     Mon Aug 27 14:18:18 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nouveau_nvkm_subdev_instmem_nv50.c,v 1.4 2018/08/27 07:36:28 riastradh Exp $   */
+/*     $NetBSD: nouveau_nvkm_subdev_instmem_nv50.c,v 1.5 2018/08/27 14:18:18 riastradh Exp $   */
 
 /*
  * Copyright 2012 Red Hat Inc.
@@ -24,7 +24,7 @@
  * Authors: Ben Skeggs
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_instmem_nv50.c,v 1.4 2018/08/27 07:36:28 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_instmem_nv50.c,v 1.5 2018/08/27 14:18:18 riastradh Exp $");
 
 #define nv50_instmem(p) container_of((p), struct nv50_instmem, base)
 #include "priv.h"
@@ -98,12 +98,13 @@
        if (ret == 0) {
 #ifdef __NetBSD__
                bus_space_tag_t bst = device->func->resource_tag(device, 3);
+               bus_addr_t base = device->func->resource_addr(device, 3);
                bus_space_handle_t bsh;
                int ret;
 
                /* Yes, truncation is really intended here.  */
                /* XXX errno NetBSD->Linux */
-               ret = -bus_space_map(bst, (u32)iobj->bar.offset, size,
+               ret = -bus_space_map(bst, base + (u32)iobj->bar.offset, size,
                    BUS_SPACE_MAP_LINEAR, &bsh);
                if (ret == 0) {
                        nvkm_memory_map(memory, &iobj->bar, 0);



Home | Main Index | Thread Index | Old Index