summaryrefslogtreecommitdiff
path: root/src/radeon_exa.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2007-09-27 12:53:34 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2007-09-27 12:53:34 +0200
commit5902e913010a2fb0c17efe01f9aade73f9646f16 (patch)
tree24c87ebc919b69d768c01dae01f5a9e34eded6de /src/radeon_exa.c
parentca728973bce504e03bf6228d18287906c35eaa3f (diff)
radeon: EXA pitch fixes.
The combined pitch/offset registers only support pitches up to 16320 bytes. With EXA >= 2.3, set the maxPitchBytes field accordingly. With older versions, limit maxX such that the pitch of 32bpp pixmaps doesn't exceed the limit. Also check the limit in RADEONGetOffsetPitch just in case. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=12551 .
Diffstat (limited to 'src/radeon_exa.c')
-rw-r--r--src/radeon_exa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/radeon_exa.c b/src/radeon_exa.c
index d074f08a..8a12e1b2 100644
--- a/src/radeon_exa.c
+++ b/src/radeon_exa.c
@@ -157,7 +157,7 @@ static Bool RADEONGetOffsetPitch(PixmapPtr pPix, int bpp, CARD32 *pitch_offset,
{
RINFO_FROM_SCREEN(pPix->drawable.pScreen);
- if (pitch % info->exa->pixmapPitchAlign != 0)
+ if (pitch > 16320 || pitch % info->exa->pixmapPitchAlign != 0)
RADEON_FALLBACK(("Bad pitch 0x%08x\n", pitch));
if (offset % info->exa->pixmapOffsetAlign != 0)