drm/nv50/hwsq: some nv92 fixes
authorMartin Peres <martin.peres@labri.fr>
Thu, 8 Mar 2012 23:15:01 +0000 (00:15 +0100)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 13 Mar 2012 07:15:03 +0000 (17:15 +1000)
The shift from hwsq_data = 0x1400 to 0x080000 actually happened in nv94, not nv92
This fixes some reclocking issues on my newly acquired nv92

Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nv50_pm.c

index e677310c8f574225627d54b5b9989c425a133b5f..d020ed4979b43853cc9bdb9db81f0a5bf17c64fd 100644 (file)
@@ -756,17 +756,18 @@ prog_hwsq(struct drm_device *dev, struct hwsq_ucode *hwsq)
        u32 hwsq_data, hwsq_kick;
        int i;
 
-       if (dev_priv->chipset < 0x90) {
+       if (dev_priv->chipset < 0x94) {
                hwsq_data = 0x001400;
                hwsq_kick = 0x00000003;
        } else {
                hwsq_data = 0x080000;
                hwsq_kick = 0x00000001;
        }
-
        /* upload hwsq ucode */
        nv_mask(dev, 0x001098, 0x00000008, 0x00000000);
        nv_wr32(dev, 0x001304, 0x00000000);
+       if (dev_priv->chipset >= 0x92)
+               nv_wr32(dev, 0x001318, 0x00000000);
        for (i = 0; i < hwsq->len / 4; i++)
                nv_wr32(dev, hwsq_data + (i * 4), hwsq->ptr.u32[i]);
        nv_mask(dev, 0x001098, 0x00000018, 0x00000018);