summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Mainz <roland.mainz@nrubsig.org>2004-12-15 09:13:36 +0000
committerRoland Mainz <roland.mainz@nrubsig.org>2004-12-15 09:13:36 +0000
commitdedca6594250056cc5a4fef74e715fc229602619 (patch)
tree783b5678656300abb7d9a3403da43aa712006c01
parente1aa00e35983953540d347e15db292489e0651c8 (diff)
xc/programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c
//bugs.freedesktop.org/show_bug.cgi?id=1888) attachment #1329 (https://bugs.freedesktop.org/attachment.cgi?id=1329): Allow pitches with a granularity of 32, rather than 64, because some clamshell iBooks have 800-byte pitches. Change Xv allocation granularity to 8 bytes, rather than 16 bytes, also (see Debian #148775). Patch by Branden Robinson and Dagfinn Ilmari Mannsåker.
-rw-r--r--src/r128_driver.c6
-rw-r--r--src/r128_video.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/src/r128_driver.c b/src/r128_driver.c
index 8167d00c..c5dec60a 100644
--- a/src/r128_driver.c
+++ b/src/r128_driver.c
@@ -1640,7 +1640,11 @@ static Bool R128PreInitModes(ScrnInfoPtr pScrn)
NULL, /* linePitches */
8 * 64, /* minPitch */
8 * 1024, /* maxPitch */
- 8 * 64, /* pitchInc */
+/*
+ * ATI docs say pitchInc must be 8 * 64, but this doesn't permit a pitch of
+ * 800 bytes, which is known to work on the Rage128 LF on clamshell iBooks
+ */
+ 8 * 32, /* pitchInc */
128, /* minHeight */
2048, /* maxHeight */
pScrn->display->virtualX,
diff --git a/src/r128_video.c b/src/r128_video.c
index 7ef31af2..04d85e0b 100644
--- a/src/r128_video.c
+++ b/src/r128_video.c
@@ -579,20 +579,20 @@ R128AllocateMemory(
pScreen = screenInfo.screens[pScrn->scrnIndex];
- new_linear = xf86AllocateOffscreenLinear(pScreen, size, 16,
+ new_linear = xf86AllocateOffscreenLinear(pScreen, size, 8,
NULL, NULL, NULL);
if(!new_linear) {
int max_size;
- xf86QueryLargestOffscreenLinear(pScreen, &max_size, 16,
+ xf86QueryLargestOffscreenLinear(pScreen, &max_size, 8,
PRIORITY_EXTREME);
if(max_size < size)
return NULL;
xf86PurgeUnlockedOffscreenAreas(pScreen);
- new_linear = xf86AllocateOffscreenLinear(pScreen, size, 16,
+ new_linear = xf86AllocateOffscreenLinear(pScreen, size, 8,
NULL, NULL, NULL);
}