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/core/engine/device Fi...



details:   https://anonhg.NetBSD.org/src/rev/71cbacae21cb
branches:  trunk
changeset: 811564:71cbacae21cb
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu Nov 05 20:26:10 2015 +0000

description:
Fix bogus output parameter for bus_space_map.

We stored the bus space handle in nv_subdev(device)->mmioh, which we
then overwrote with whatever was in the mmioh local variable -- maybe
garbage, maybe an old mapping, almost certainly wrong either way.

Instead store it in mmioh so that the subsequent assignment
nv_subdev(device)->mmioh = mmioh actually works as intended.

diffstat:

 sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r ac3f64b6d2c0 -r 71cbacae21cb sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c    Thu Nov 05 16:47:29 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c    Thu Nov 05 20:26:10 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nouveau_engine_device_base.c,v 1.5 2015/10/17 21:13:38 jmcneill Exp $  */
+/*     $NetBSD: nouveau_engine_device_base.c,v 1.6 2015/11/05 20:26:10 riastradh Exp $ */
 
 /*
  * Copyright 2012 Red Hat Inc.
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_device_base.c,v 1.5 2015/10/17 21:13:38 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_device_base.c,v 1.6 2015/11/05 20:26:10 riastradh Exp $");
 
 #include <core/object.h>
 #include <core/device.h>
@@ -293,8 +293,8 @@
 #ifdef __NetBSD__
        if (!(args->disable & NV_DEVICE_DISABLE_MMIO) &&
            !nv_subdev(device)->mmiosz) {
-               if (bus_space_map(mmiot, mmio_base, mmio_size, 0,
-                       &nv_subdev(device)->mmioh) != 0) {
+               if (bus_space_map(mmiot, mmio_base, mmio_size, 0, &mmioh)
+                   != 0) {
                        nv_error(device, "unable to map device registers\n");
                        return -ENOMEM;
                }



Home | Main Index | Thread Index | Old Index