aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv10_fifo.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv10_fifo.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv10_fifo.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/gpu/drm/nouveau/nv10_fifo.c b/drivers/gpu/drm/nouveau/nv10_fifo.c
index d2ecbff4bee1..476451c6f961 100644
--- a/drivers/gpu/drm/nouveau/nv10_fifo.c
+++ b/drivers/gpu/drm/nouveau/nv10_fifo.c
@@ -33,13 +33,6 @@
33#define NV10_RAMFC__SIZE ((dev_priv->chipset) >= 0x17 ? 64 : 32) 33#define NV10_RAMFC__SIZE ((dev_priv->chipset) >= 0x17 ? 64 : 32)
34 34
35int 35int
36nv10_fifo_channel_id(struct drm_device *dev)
37{
38 return nv_rd32(dev, NV03_PFIFO_CACHE1_PUSH1) &
39 NV10_PFIFO_CACHE1_PUSH1_CHID_MASK;
40}
41
42int
43nv10_fifo_create_context(struct nouveau_channel *chan) 36nv10_fifo_create_context(struct nouveau_channel *chan)
44{ 37{
45 struct drm_nouveau_private *dev_priv = chan->dev->dev_private; 38 struct drm_nouveau_private *dev_priv = chan->dev->dev_private;
@@ -139,7 +132,7 @@ nv10_fifo_unload_context(struct drm_device *dev)
139 uint32_t fc, tmp; 132 uint32_t fc, tmp;
140 int chid; 133 int chid;
141 134
142 chid = pfifo->channel_id(dev); 135 chid = nv_rd32(dev, NV03_PFIFO_CACHE1_PUSH1) & 0x1f;
143 if (chid < 0 || chid >= dev_priv->engine.fifo.channels) 136 if (chid < 0 || chid >= dev_priv->engine.fifo.channels)
144 return 0; 137 return 0;
145 fc = NV10_RAMFC(chid); 138 fc = NV10_RAMFC(chid);
@@ -232,8 +225,9 @@ nv10_fifo_init(struct drm_device *dev)
232 nv_wr32(dev, NV03_PFIFO_CACHE1_PUSH1, pfifo->channels - 1); 225 nv_wr32(dev, NV03_PFIFO_CACHE1_PUSH1, pfifo->channels - 1);
233 226
234 nv10_fifo_init_intr(dev); 227 nv10_fifo_init_intr(dev);
235 pfifo->enable(dev); 228 nv_wr32(dev, NV03_PFIFO_CACHE1_PUSH0, 1);
236 pfifo->reassign(dev, true); 229 nv_wr32(dev, NV04_PFIFO_CACHE1_PULL0, 1);
230 nv_wr32(dev, NV03_PFIFO_CACHES, 1);
237 231
238 for (i = 0; i < dev_priv->engine.fifo.channels; i++) { 232 for (i = 0; i < dev_priv->engine.fifo.channels; i++) {
239 if (dev_priv->channels.ptr[i]) { 233 if (dev_priv->channels.ptr[i]) {