From d33db63b3775409b1725cb4f5d17eb7cab2cc656 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Wed, 10 Oct 2012 10:34:29 +1000 Subject: [PATCH] drm/nv20/fb: fix zcomp register calculation on big-endian systems Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/core/subdev/fb/nv20.c | 3 +++ drivers/gpu/drm/nouveau/core/subdev/fb/nv25.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/gpu/drm/nouveau/core/subdev/fb/nv20.c b/drivers/gpu/drm/nouveau/core/subdev/fb/nv20.c index 86bceb1b02e0..2c30f238f23c 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/fb/nv20.c +++ b/drivers/gpu/drm/nouveau/core/subdev/fb/nv20.c @@ -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 } } diff --git a/drivers/gpu/drm/nouveau/core/subdev/fb/nv25.c b/drivers/gpu/drm/nouveau/core/subdev/fb/nv25.c index 257a025db1da..7529353bc1de 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/fb/nv25.c +++ b/drivers/gpu/drm/nouveau/core/subdev/fb/nv25.c @@ -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 } } -- 2.30.2