]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
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 86bceb1b02e0903b437802a6c05f660730928450..2c30f238f23c25b9b52ba4e90308e0cc8a94e040 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 257a025db1dab6942ebfe291049627da88eef79a..7529353bc1de18591ce95694d34e46252fb6d591 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
        }
 }