summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
authorPatrice Mandin <pmandin@caramail.com>2007-08-25 00:12:58 +0200
committerPatrice Mandin <pmandin@caramail.com>2007-08-25 00:12:58 +0200
commit502bbdbe14fa458ed06c7fa4b1ccb63e4f126625 (patch)
tree12a4d5d359686bc1e8a9a79367b84508da7addf0 /shared-core
parent98750111961a5729eba9433b927f8c24548fbace (diff)
nouveau: nv10: output a warning if last channel invalid, and switch to next
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/nv10_graph.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/shared-core/nv10_graph.c b/shared-core/nv10_graph.c
index 567ce6a4..18bab7eb 100644
--- a/shared-core/nv10_graph.c
+++ b/shared-core/nv10_graph.c
@@ -608,21 +608,23 @@ void nouveau_nv10_context_switch(struct drm_device *dev)
last = dev_priv->fifos[chid];
if (!last) {
- DRM_DEBUG("Invalid last channel\n");
- return;
+ DRM_DEBUG("WARNING: Invalid last channel, switch to %x\n",
+ next->id);
+ } else {
+ DRM_INFO("NV: PGRAPH context switch interrupt channel %x -> %x\n",
+ last->id, next->id);
}
- DRM_INFO("NV: PGRAPH context switch interrupt channel %x -> %x\n",
- last->id, next->id);
-
NV_WRITE(NV04_PGRAPH_FIFO,0x0);
#if 0
NV_WRITE(NV_PFIFO_CACH1_PUL0, 0x00000000);
NV_WRITE(NV_PFIFO_CACH1_PUL1, 0x00000000);
NV_WRITE(NV_PFIFO_CACHES, 0x00000000);
#endif
- nv10_graph_save_context(last);
-
+ if (last) {
+ nv10_graph_save_context(last);
+ }
+
nouveau_wait_for_idle(dev);
NV_WRITE(NV10_PGRAPH_CTX_CONTROL, 0x10000000);