aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv04_graph.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv04_graph.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv04_graph.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/gpu/drm/nouveau/nv04_graph.c b/drivers/gpu/drm/nouveau/nv04_graph.c
index 3626ee7db3ba..412979352c35 100644
--- a/drivers/gpu/drm/nouveau/nv04_graph.c
+++ b/drivers/gpu/drm/nouveau/nv04_graph.c
@@ -450,13 +450,13 @@ nv04_graph_context_del(struct nouveau_channel *chan, int engine)
450 unsigned long flags; 450 unsigned long flags;
451 451
452 spin_lock_irqsave(&dev_priv->context_switch_lock, flags); 452 spin_lock_irqsave(&dev_priv->context_switch_lock, flags);
453 nv04_graph_fifo_access(dev, false); 453 nv_mask(dev, NV04_PGRAPH_FIFO, 0x00000001, 0x00000000);
454 454
455 /* Unload the context if it's the currently active one */ 455 /* Unload the context if it's the currently active one */
456 if (nv04_graph_channel(dev) == chan) 456 if (nv04_graph_channel(dev) == chan)
457 nv04_graph_unload_context(dev); 457 nv04_graph_unload_context(dev);
458 458
459 nv04_graph_fifo_access(dev, true); 459 nv_mask(dev, NV04_PGRAPH_FIFO, 0x00000001, 0x00000001);
460 spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); 460 spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags);
461 461
462 /* Free the context resources */ 462 /* Free the context resources */
@@ -545,17 +545,6 @@ nv04_graph_fini(struct drm_device *dev, int engine)
545 return 0; 545 return 0;
546} 546}
547 547
548void
549nv04_graph_fifo_access(struct drm_device *dev, bool enabled)
550{
551 if (enabled)
552 nv_wr32(dev, NV04_PGRAPH_FIFO,
553 nv_rd32(dev, NV04_PGRAPH_FIFO) | 1);
554 else
555 nv_wr32(dev, NV04_PGRAPH_FIFO,
556 nv_rd32(dev, NV04_PGRAPH_FIFO) & ~1);
557}
558
559static int 548static int
560nv04_graph_mthd_set_ref(struct nouveau_channel *chan, 549nv04_graph_mthd_set_ref(struct nouveau_channel *chan,
561 u32 class, u32 mthd, u32 data) 550 u32 class, u32 mthd, u32 data)