OSDN Git Service

nouveau: fix bo mapping issue
[android-x86/external-libdrm.git] / shared-core / nv40_fifo.c
index eb160ee..7f9d5e3 100644 (file)
@@ -135,7 +135,9 @@ nv40_fifo_load_context(struct nouveau_channel *chan)
        NV_WRITE(NV04_PFIFO_DMA_TIMESLICE, tmp);
 
        /* Set channel active, and in DMA mode */
-       NV_WRITE(NV03_PFIFO_CACHE1_PUSH1  , 0x00010000 | chan->id);
+       NV_WRITE(NV03_PFIFO_CACHE1_PUSH1,
+                NV03_PFIFO_CACHE1_PUSH1_DMA | chan->id);
+
        /* Reset DMA_CTL_AT_INFO to INVALID */
        tmp = NV_READ(NV04_PFIFO_CACHE1_DMA_CTL) & ~(1<<31);
        NV_WRITE(NV04_PFIFO_CACHE1_DMA_CTL, tmp);
@@ -193,3 +195,15 @@ nv40_fifo_save_context(struct nouveau_channel *chan)
        return 0;
 }
 
+int
+nv40_fifo_init(struct drm_device *dev)
+{
+       struct drm_nouveau_private *dev_priv = dev->dev_private;
+       int ret;
+
+       if ((ret = nouveau_fifo_init(dev)))
+               return ret;
+
+       NV_WRITE(NV04_PFIFO_DMA_TIMESLICE, 0x2101ffff);
+       return 0;
+}