]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/gpu/drm/nouveau/nv10_fifo.c
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / drivers / gpu / drm / nouveau / nv10_fifo.c
index f1b03ad58fd5459f928ad6b54d97a45dce417648..d2ecbff4bee1bc35fd8559a851b2ccf052114814 100644 (file)
@@ -53,6 +53,11 @@ nv10_fifo_create_context(struct nouveau_channel *chan)
        if (ret)
                return ret;
 
+       chan->user = ioremap(pci_resource_start(dev->pdev, 0) +
+                            NV03_USER(chan->id), PAGE_SIZE);
+       if (!chan->user)
+               return -ENOMEM;
+
        /* Fill entries that are seen filled in dumps of nvidia driver just
         * after channel's is put into DMA mode
         */
@@ -73,17 +78,6 @@ nv10_fifo_create_context(struct nouveau_channel *chan)
        return 0;
 }
 
-void
-nv10_fifo_destroy_context(struct nouveau_channel *chan)
-{
-       struct drm_device *dev = chan->dev;
-
-       nv_wr32(dev, NV04_PFIFO_MODE,
-                       nv_rd32(dev, NV04_PFIFO_MODE) & ~(1 << chan->id));
-
-       nouveau_gpuobj_ref(NULL, &chan->ramfc);
-}
-
 static void
 nv10_fifo_do_load_context(struct drm_device *dev, int chid)
 {
@@ -219,6 +213,7 @@ nv10_fifo_init_ramxx(struct drm_device *dev)
 static void
 nv10_fifo_init_intr(struct drm_device *dev)
 {
+       nouveau_irq_register(dev, 8, nv04_fifo_isr);
        nv_wr32(dev, 0x002100, 0xffffffff);
        nv_wr32(dev, 0x002140, 0xffffffff);
 }
@@ -241,7 +236,7 @@ nv10_fifo_init(struct drm_device *dev)
        pfifo->reassign(dev, true);
 
        for (i = 0; i < dev_priv->engine.fifo.channels; i++) {
-               if (dev_priv->fifos[i]) {
+               if (dev_priv->channels.ptr[i]) {
                        uint32_t mode = nv_rd32(dev, NV04_PFIFO_MODE);
                        nv_wr32(dev, NV04_PFIFO_MODE, mode | (1 << i));
                }