drm/nouveau: fix big-endian switch
authorBen Skeggs <bskeggs@redhat.com>
Tue, 14 Jun 2011 00:16:17 +0000 (10:16 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Sat, 18 Jun 2011 04:38:27 +0000 (14:38 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_state.c

index 80218887e0a004fc19337f180a93fe4ecb4196d2..144f79a350ae3d69b542a7f364988d194a28cbcb 100644 (file)
@@ -881,8 +881,8 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)
 
 #ifdef __BIG_ENDIAN
        /* Put the card in BE mode if it's not */
-       if (nv_rd32(dev, NV03_PMC_BOOT_1))
-               nv_wr32(dev, NV03_PMC_BOOT_1, 0x00000001);
+       if (nv_rd32(dev, NV03_PMC_BOOT_1) != 0x01000001)
+               nv_wr32(dev, NV03_PMC_BOOT_1, 0x01000001);
 
        DRM_MEMORYBARRIER();
 #endif