drm/nv20/fb: fix zcomp register calculation on big-endian systems
authorBen Skeggs <bskeggs@redhat.com>
Wed, 10 Oct 2012 00:34:29 +0000 (10:34 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 28 Nov 2012 23:56:28 +0000 (09:56 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/subdev/fb/nv20.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv25.c

index 86bceb1..2c30f23 100644 (file)
@@ -61,6 +61,9 @@ nv20_fb_tile_comp(struct nouveau_fb *pfb, int i, u32 size, u32 flags,
                tile->zcomp |= 0x80000000;
                if (bpp != 16)
                        tile->zcomp |= 0x04000000;
+#ifdef __BIG_ENDIAN
+               tile->zcomp |= 0x08000000;
+#endif
        }
 }
 
index 257a025..7529353 100644 (file)
@@ -49,6 +49,9 @@ nv25_fb_tile_comp(struct nouveau_fb *pfb, int i, u32 size, u32 flags,
                        tile->zcomp |= 0x00100000;
                else
                        tile->zcomp |= 0x00200000;
+#ifdef __BIG_ENDIAN
+               tile->zcomp |= 0x01000000;
+#endif
        }
 }