Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/external/bsd/drm2/dist/drm/nouveau/core Pull up follo...
details: https://anonhg.NetBSD.org/src/rev/b4128f816088
branches: netbsd-7
changeset: 799800:b4128f816088
user: snj <snj%NetBSD.org@localhost>
date: Thu Feb 11 23:49:52 2016 +0000
description:
Pull up following revision(s) (requested by riastradh in ticket #1116):
sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_base.c: revision 1.4
sys/external/bsd/drm2/dist/drm/nouveau/core/include/engine/fifo.h: revision 1.4
dtor gets called if ctor fails. Make it work in that case.
diffstat:
sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_base.c | 10 +++++++---
sys/external/bsd/drm2/dist/drm/nouveau/core/include/engine/fifo.h | 1 +
2 files changed, 8 insertions(+), 3 deletions(-)
diffs (49 lines):
diff -r 245294877133 -r b4128f816088 sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_base.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_base.c Thu Feb 11 23:31:06 2016 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_base.c Thu Feb 11 23:49:52 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_engine_fifo_base.c,v 1.2.4.1 2014/09/21 17:41:53 snj Exp $ */
+/* $NetBSD: nouveau_engine_fifo_base.c,v 1.2.4.2 2016/02/11 23:49:52 snj Exp $ */
/*
* Copyright 2012 Red Hat Inc.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_base.c,v 1.2.4.1 2014/09/21 17:41:53 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_base.c,v 1.2.4.2 2016/02/11 23:49:52 snj Exp $");
#include <core/client.h>
#include <core/object.h>
@@ -98,6 +98,7 @@
addr + (chan->chid * size), size, 0, &chan->bsh);
if (ret)
return ret;
+ chan->mapped = true;
#else
chan->user = ioremap(nv_device_resource_start(device, bar) + addr +
(chan->chid * size), size);
@@ -118,7 +119,10 @@
unsigned long flags;
#ifdef __NetBSD__
- bus_space_unmap(chan->bst, chan->bsh, chan->size);
+ if (chan->mapped) {
+ bus_space_unmap(chan->bst, chan->bsh, chan->size);
+ chan->mapped = false;
+ }
#else
iounmap(chan->user);
#endif
diff -r 245294877133 -r b4128f816088 sys/external/bsd/drm2/dist/drm/nouveau/core/include/engine/fifo.h
--- a/sys/external/bsd/drm2/dist/drm/nouveau/core/include/engine/fifo.h Thu Feb 11 23:31:06 2016 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/core/include/engine/fifo.h Thu Feb 11 23:49:52 2016 +0000
@@ -12,6 +12,7 @@
#ifdef __NetBSD__
bus_space_tag_t bst;
bus_space_handle_t bsh;
+ bool mapped;
#else
void __iomem *user;
#endif
Home |
Main Index |
Thread Index |
Old Index