diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv10_fifo.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv10_fifo.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/gpu/drm/nouveau/nv10_fifo.c b/drivers/gpu/drm/nouveau/nv10_fifo.c index f1b03ad58fd5..d2ecbff4bee1 100644 --- a/drivers/gpu/drm/nouveau/nv10_fifo.c +++ b/drivers/gpu/drm/nouveau/nv10_fifo.c | |||
@@ -53,6 +53,11 @@ nv10_fifo_create_context(struct nouveau_channel *chan) | |||
53 | if (ret) | 53 | if (ret) |
54 | return ret; | 54 | return ret; |
55 | 55 | ||
56 | chan->user = ioremap(pci_resource_start(dev->pdev, 0) + | ||
57 | NV03_USER(chan->id), PAGE_SIZE); | ||
58 | if (!chan->user) | ||
59 | return -ENOMEM; | ||
60 | |||
56 | /* Fill entries that are seen filled in dumps of nvidia driver just | 61 | /* Fill entries that are seen filled in dumps of nvidia driver just |
57 | * after channel's is put into DMA mode | 62 | * after channel's is put into DMA mode |
58 | */ | 63 | */ |
@@ -73,17 +78,6 @@ nv10_fifo_create_context(struct nouveau_channel *chan) | |||
73 | return 0; | 78 | return 0; |
74 | } | 79 | } |
75 | 80 | ||
76 | void | ||
77 | nv10_fifo_destroy_context(struct nouveau_channel *chan) | ||
78 | { | ||
79 | struct drm_device *dev = chan->dev; | ||
80 | |||
81 | nv_wr32(dev, NV04_PFIFO_MODE, | ||
82 | nv_rd32(dev, NV04_PFIFO_MODE) & ~(1 << chan->id)); | ||
83 | |||
84 | nouveau_gpuobj_ref(NULL, &chan->ramfc); | ||
85 | } | ||
86 | |||
87 | static void | 81 | static void |
88 | nv10_fifo_do_load_context(struct drm_device *dev, int chid) | 82 | nv10_fifo_do_load_context(struct drm_device *dev, int chid) |
89 | { | 83 | { |
@@ -219,6 +213,7 @@ nv10_fifo_init_ramxx(struct drm_device *dev) | |||
219 | static void | 213 | static void |
220 | nv10_fifo_init_intr(struct drm_device *dev) | 214 | nv10_fifo_init_intr(struct drm_device *dev) |
221 | { | 215 | { |
216 | nouveau_irq_register(dev, 8, nv04_fifo_isr); | ||
222 | nv_wr32(dev, 0x002100, 0xffffffff); | 217 | nv_wr32(dev, 0x002100, 0xffffffff); |
223 | nv_wr32(dev, 0x002140, 0xffffffff); | 218 | nv_wr32(dev, 0x002140, 0xffffffff); |
224 | } | 219 | } |
@@ -241,7 +236,7 @@ nv10_fifo_init(struct drm_device *dev) | |||
241 | pfifo->reassign(dev, true); | 236 | pfifo->reassign(dev, true); |
242 | 237 | ||
243 | for (i = 0; i < dev_priv->engine.fifo.channels; i++) { | 238 | for (i = 0; i < dev_priv->engine.fifo.channels; i++) { |
244 | if (dev_priv->fifos[i]) { | 239 | if (dev_priv->channels.ptr[i]) { |
245 | uint32_t mode = nv_rd32(dev, NV04_PFIFO_MODE); | 240 | uint32_t mode = nv_rd32(dev, NV04_PFIFO_MODE); |
246 | nv_wr32(dev, NV04_PFIFO_MODE, mode | (1 << i)); | 241 | nv_wr32(dev, NV04_PFIFO_MODE, mode | (1 << i)); |
247 | } | 242 | } |