drm/nv50: fix compute object class
authorBen Skeggs <bskeggs@redhat.com>
Thu, 4 Nov 2010 03:40:15 +0000 (13:40 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 3 Dec 2010 05:11:25 +0000 (15:11 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nv50_graph.c

index e0f52942b2eb93aa80ea6298e1c20f075170b032..7a98d41c68a69594f4ae747dcf7bf66f289ccfa4 100644 (file)
@@ -425,8 +425,6 @@ nv50_graph_register(struct drm_device *dev)
        NVOBJ_CLASS(dev, 0x0030, GR); /* null */
        NVOBJ_CLASS(dev, 0x5039, GR); /* m2mf */
        NVOBJ_CLASS(dev, 0x502d, GR); /* 2d */
-       NVOBJ_CLASS(dev, 0x50c0, GR); /* compute */
-       NVOBJ_CLASS(dev, 0x85c0, GR); /* compute (nva3, nva5, nva8) */
 
        /* tesla */
        if (dev_priv->chipset == 0x50)
@@ -452,6 +450,14 @@ nv50_graph_register(struct drm_device *dev)
                }
        }
 
+       /* compute */
+       if (dev_priv->chipset <= 0xa0 ||
+           dev_priv->chipset == 0xaa ||
+           dev_priv->chipset == 0xac)
+               NVOBJ_CLASS(dev, 0x50c0, GR);
+       else
+               NVOBJ_CLASS(dev, 0x85c0, GR);
+
        dev_priv->engine.graph.registered = true;
        return 0;
 }