summaryrefslogtreecommitdiff
path: root/src/radeon_exa_funcs.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_funcs.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_funcs.c')
-rw-r--r--src/radeon_exa_funcs.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/radeon_exa_funcs.c b/src/radeon_exa_funcs.c
index d2338138..8e14cd9f 100644
--- a/src/radeon_exa_funcs.c
+++ b/src/radeon_exa_funcs.c
@@ -511,8 +511,8 @@ Bool FUNC_NAME(RADEONDrawInit)(ScreenPtr pScreen)
return FALSE;
}
- info->exa->exa_major = 2;
- info->exa->exa_minor = 0;
+ info->exa->exa_major = EXA_VERSION_MAJOR;
+ info->exa->exa_minor = EXA_VERSION_MINOR;
info->exa->PrepareSolid = FUNC_NAME(RADEONPrepareSolid);
info->exa->Solid = FUNC_NAME(RADEONSolid);
@@ -564,7 +564,14 @@ Bool FUNC_NAME(RADEONDrawInit)(ScreenPtr pScreen)
}
#endif
+#if EXA_VERSION_MAJOR > 2 || (EXA_VERSION_MAJOR == 2 && EXA_VERSION_MINOR >= 3)
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Setting EXA maxPitchBytes\n");
+
+ info->exa->maxPitchBytes = 16320;
info->exa->maxX = info->exa->Composite ? 2048 : 8192;
+#else
+ info->exa->maxX = info->exa->Composite ? 2048 : 16320 / 4;
+#endif
info->exa->maxY = info->exa->Composite ? 2048 : 8192;
RADEONEngineInit(pScrn);