Module Name: src
Committed By: riastradh
Date: Wed Apr 13 08:50:51 UTC 2016
Modified Files:
src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device:
nouveau_engine_device_base.c
Log Message:
Exclude VRAM and FIFO regions from MMIO register mapping.
Nouveau maps those separately, and it is not trivial to convert those
mappings to bus_space_subregion.
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c
diff -u src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c:1.9 src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c:1.10
--- src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c:1.9 Sun Feb 14 03:41:18 2016
+++ src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c Wed Apr 13 08:50:51 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_engine_device_base.c,v 1.9 2016/02/14 03:41:18 riastradh Exp $ */
+/* $NetBSD: nouveau_engine_device_base.c,v 1.10 2016/04/13 08:50:51 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.9 2016/02/14 03:41:18 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_device_base.c,v 1.10 2016/04/13 08:50:51 riastradh Exp $");
#include <core/object.h>
#include <core/device.h>
@@ -297,6 +297,12 @@ nouveau_devobj_ctor(struct nouveau_objec
#ifdef __NetBSD__
if (!(args->disable & NV_DEVICE_DISABLE_MMIO) &&
!nv_subdev(device)->mmiosz) {
+ /*
+ * Map only through PRAMIN -- don't map the command
+ * FIFO MMIO regions, which start at NV_FIFO_OFFSET =
+ * 0x800000 and are mapped separately.
+ */
+ mmio_size = MIN(mmio_size, 0x800000);
/* XXX errno NetBSD->Linux */
ret = -bus_space_map(mmiot, mmio_base, mmio_size, 0, &mmioh);
if (ret) {