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/engine/fifo P...
details: https://anonhg.NetBSD.org/src/rev/6de56cf2559b
branches: netbsd-7
changeset: 799776:6de56cf2559b
user: riz <riz%NetBSD.org@localhost>
date: Wed Jan 27 19:24:30 2016 +0000
description:
Pull up following revision(s) (requested by riastradh in ticket #1079):
sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c: revision 1.6
sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c: revision 1.5
don't try to wait if (cold), spin waiting for registers to clear.
same as in nouveau_engine_fifo_nve0.c 1.5. should fix PR#50362.
minor re-format of the previous.
diffstat:
sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c | 33 ++++++---
sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c | 7 +-
2 files changed, 25 insertions(+), 15 deletions(-)
diffs (83 lines):
diff -r 6823154b25d1 -r 6de56cf2559b sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c Wed Jan 27 00:27:45 2016 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c Wed Jan 27 19:24:30 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_engine_fifo_nvc0.c,v 1.1.1.1.4.2 2015/03/06 21:39:09 snj Exp $ */
+/* $NetBSD: nouveau_engine_fifo_nvc0.c,v 1.1.1.1.4.3 2016/01/27 19:24:30 riz Exp $ */
/*
* Copyright 2012 Red Hat Inc.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_nvc0.c,v 1.1.1.1.4.2 2015/03/06 21:39:09 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_nvc0.c,v 1.1.1.1.4.3 2016/01/27 19:24:30 riz Exp $");
#include <core/client.h>
#include <core/handle.h>
@@ -115,17 +115,26 @@
nv_wr32(priv, 0x002274, 0x01f00000 | (p >> 3));
#ifdef __NetBSD__
- {
- int ret;
+ if (cold) {
+ uint count = 2000;
+ while (count-- > 0) {
+ if (!(nv_rd32(priv, 0x00227c) & 0x00100000))
+ break;
+ delay(1000);
+ }
+ if (count == 0)
+ nv_error(priv, "runlist update timeout\n");
+ } else {
+ int ret;
- spin_lock(&priv->runlist.lock);
- DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL(ret, &priv->runlist.wait,
- &priv->runlist.lock, msecs_to_jiffies(2000),
- !(nv_rd32(priv, 0x00227c) & 0x00100000));
- if (ret == 0)
- nv_error(priv, "runlist update timeout\n");
- spin_unlock(&priv->runlist.lock);
- }
+ spin_lock(&priv->runlist.lock);
+ DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL(ret, &priv->runlist.wait,
+ &priv->runlist.lock, msecs_to_jiffies(2000),
+ !(nv_rd32(priv, 0x00227c) & 0x00100000));
+ if (ret == 0)
+ nv_error(priv, "runlist update timeout\n");
+ spin_unlock(&priv->runlist.lock);
+ }
#else
if (wait_event_timeout(priv->runlist.wait,
!(nv_rd32(priv, 0x00227c) & 0x00100000),
diff -r 6823154b25d1 -r 6de56cf2559b sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c Wed Jan 27 00:27:45 2016 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c Wed Jan 27 19:24:30 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_engine_fifo_nve0.c,v 1.1.1.1.4.3 2015/11/06 23:03:20 riz Exp $ */
+/* $NetBSD: nouveau_engine_fifo_nve0.c,v 1.1.1.1.4.4 2016/01/27 19:24:30 riz Exp $ */
/*
* Copyright 2012 Red Hat Inc.
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_nve0.c,v 1.1.1.1.4.3 2015/11/06 23:03:20 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_engine_fifo_nve0.c,v 1.1.1.1.4.4 2016/01/27 19:24:30 riz Exp $");
#include <core/client.h>
#include <core/handle.h>
@@ -139,7 +139,8 @@
if (cold) {
uint count = 2000;
while (count-- > 0) {
- if (!(nv_rd32(priv, 0x002284 + (engine * 0x08)) & 0x00100000))
+ if (!(nv_rd32(priv, 0x002284 +
+ (engine * 0x08)) & 0x00100000))
break;
delay(1000);
}
Home |
Main Index |
Thread Index |
Old Index