]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Revert "drm/nouveau: inform userspace of new kernel subchannel requirements"
authorBen Skeggs <bskeggs@redhat.com>
Thu, 29 Mar 2012 10:21:32 +0000 (20:21 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 29 Mar 2012 13:16:31 +0000 (23:16 +1000)
This reverts commit a81f15499887d3f9f24ec70bb9b7e778942a6b7b.

Gah, we have a released userspace component using fixed subc assignment
that conflicts with this.  To avoid breaking ABI this needs to be
reverted.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_channel.c
drivers/gpu/drm/nouveau/nouveau_dma.h

index 44e6416d4a336054409a24e05bfe20c66c4c7d1a..337e228629ed66860c1d919fa26992c18580c28a 100644 (file)
@@ -436,11 +436,18 @@ nouveau_ioctl_fifo_alloc(struct drm_device *dev, void *data,
        }
 
        if (dev_priv->card_type < NV_C0) {
-               init->subchan[0].handle = NvSw;
-               init->subchan[0].grclass = NV_SW;
-               init->nr_subchan = 1;
+               init->subchan[0].handle = NvM2MF;
+               if (dev_priv->card_type < NV_50)
+                       init->subchan[0].grclass = 0x0039;
+               else
+                       init->subchan[0].grclass = 0x5039;
+               init->subchan[1].handle = NvSw;
+               init->subchan[1].grclass = NV_SW;
+               init->nr_subchan = 2;
        } else {
-               init->nr_subchan = 0;
+               init->subchan[0].handle  = 0x9039;
+               init->subchan[0].grclass = 0x9039;
+               init->nr_subchan = 1;
        }
 
        /* Named memory object area */
index bcf0fd9e313eb6fdc2db1e158cdecfb77cf1310d..23d4edf992b7d20440eb53ce8273231ccfe487e1 100644 (file)
@@ -48,8 +48,8 @@ void nv50_dma_push(struct nouveau_channel *, struct nouveau_bo *,
 
 /* Hardcoded object assignments to subchannels (subchannel id). */
 enum {
-       NvSubSw         = 0,
-       NvSubM2MF       = 1,
+       NvSubM2MF       = 0,
+       NvSubSw         = 1,
        NvSub2D         = 2,
        NvSubCtxSurf2D  = 2,
        NvSubGdiRect    = 3,