Skip to content

Commit

Permalink
drm/nv20/fb: fix zcomp register calculation on big-endian systems
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Ben Skeggs committed Nov 28, 2012
1 parent 4ae2074 commit d33db63
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/nouveau/core/subdev/fb/nv20.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/nouveau/core/subdev/fb/nv25.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down

0 comments on commit d33db63

Please sign in to comment.