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/nvif nouveau: Initial...
details: https://anonhg.NetBSD.org/src/rev/2cc05ee191ca
branches: trunk
changeset: 1028460:2cc05ee191ca
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 11:06:03 2021 +0000
description:
nouveau: Initialize object->map.tag/addr/size before use.
diffstat:
sys/external/bsd/drm2/dist/drm/nouveau/nvif/nouveau_nvif_object.c | 16 +++++++--
1 files changed, 12 insertions(+), 4 deletions(-)
diffs (42 lines):
diff -r e638918c5b78 -r 2cc05ee191ca sys/external/bsd/drm2/dist/drm/nouveau/nvif/nouveau_nvif_object.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nvif/nouveau_nvif_object.c Sun Dec 19 11:05:55 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nvif/nouveau_nvif_object.c Sun Dec 19 11:06:03 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_nvif_object.c,v 1.6 2021/12/19 10:51:57 riastradh Exp $ */
+/* $NetBSD: nouveau_nvif_object.c,v 1.7 2021/12/19 11:06:03 riastradh Exp $ */
/*
* Copyright 2014 Red Hat Inc.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvif_object.c,v 1.6 2021/12/19 10:51:57 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvif_object.c,v 1.7 2021/12/19 11:06:03 riastradh Exp $");
#include <nvif/object.h>
#include <nvif/client.h>
@@ -259,13 +259,21 @@
if (ret >= 0) {
if (ret) {
#ifdef __NetBSD__
- ret = client->driver->map(client, tag, handle,
- object->map.size,
+ /*
+ * Note: handle is the bus address;
+ * object->map.handle is the
+ * bus_space_handle_t, which is typically a
+ * virtual address mapped in kva.
+ */
+ object->map.tag = tag;
+ object->map.addr = handle;
+ ret = client->driver->map(client, tag, handle, length,
&object->map.handle, &object->map.ptr);
if (ret) {
nvif_object_unmap(object);
return -ENOMEM;
}
+ object->map.size = length;
#else
object->map.ptr = client->driver->map(client,
handle,
Home |
Main Index |
Thread Index |
Old Index