summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2004-12-04 22:34:54 +0000
committerDaniel Stone <daniel@fooishbar.org>2004-12-04 22:34:54 +0000
commit960d15ae3a44efe7c02a3d6d0acbabe63e07be74 (patch)
tree5741febc9a6bcfae725a85b52ca9fb8d277aaeaf
parent4706dfb7804a46e3cc5aafc3644f5a1134ab3d19 (diff)
Disable interrupt handling after the DRM handler has been removed,
preventing lockups (closes: #1886). 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 (closes: #1888).
-rw-r--r--src/r128_dri.c1
-rw-r--r--src/r128_driver.c6
-rw-r--r--src/r128_video.c19
3 files changed, 15 insertions, 11 deletions
diff --git a/src/r128_dri.c b/src/r128_dri.c
index 2b35c334..65bb5b94 100644
--- a/src/r128_dri.c
+++ b/src/r128_dri.c
@@ -1297,6 +1297,7 @@ void R128DRICloseScreen(ScreenPtr pScreen)
if (info->irq) {
drmCtlUninstHandler(info->drmFD);
info->irq = 0;
+ info->gen_int_cntl = 0;
}
/* De-allocate vertex buffers */
diff --git a/src/r128_driver.c b/src/r128_driver.c
index 714df3da..cf4e0450 100644
--- a/src/r128_driver.c
+++ b/src/r128_driver.c
@@ -1642,7 +1642,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 b5a22af0..04d85e0b 100644
--- a/src/r128_video.c
+++ b/src/r128_video.c
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_video.c,v 1.28 2003/04/23 21:51:31 tsi Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_video.c,v 1.30 2003/11/10 18:22:18 tsi Exp $ */
#include "r128.h"
#include "r128_reg.h"
@@ -65,7 +65,7 @@ static void R128ECP(ScrnInfoPtr pScrn, R128PortPrivPtr pPriv)
R128InfoPtr info = R128PTR(pScrn);
unsigned char *R128MMIO = info->MMIO;
int dot_clock = info->ModeReg.dot_clock_freq;
-
+
if (dot_clock < 12500) pPriv->ecp_div = 0;
else if (dot_clock < 25000) pPriv->ecp_div = 1;
else pPriv->ecp_div = 2;
@@ -245,7 +245,7 @@ R128SetupImageVideo(ScreenPtr pScreen)
info->adaptor = adapt;
pPriv = (R128PortPrivPtr)(adapt->pPortPrivates[0].ptr);
- REGION_INIT(pScreen, &(pPriv->clip), NullBox, 0);
+ REGION_NULL(pScreen, &(pPriv->clip));
R128ResetVideo(pScrn);
@@ -430,7 +430,7 @@ R128DMA(
return FALSE;
}
- /* Copy parts of the block into buffers and fire them */
+ /* Copy parts of the block into buffers and fire them */
dstpassbytes = hpass*dstPitch;
dstPitch /= 8;
@@ -449,7 +449,7 @@ R128DMA(
} else {
int count = hpass;
while(count--) {
- memcpy(buf, src, w);
+ memcpy(buf, src, w);
src += srcPitch;
buf += w;
}
@@ -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);
}
@@ -770,7 +770,7 @@ R128PutImage(
R128InfoPtr info = R128PTR(pScrn);
R128PortPrivPtr pPriv = (R128PortPrivPtr)data;
INT32 xa, xb, ya, yb;
- int pitch, new_size, offset, s1offset, s2offset, s3offset;
+ int new_size, offset, s1offset, s2offset, s3offset;
int srcPitch, srcPitch2, dstPitch;
int d1line, d2line, d3line, d1offset, d2offset, d3offset;
int top, left, npixels, nlines, bpp;
@@ -826,7 +826,6 @@ R128PutImage(
dstBox.y2 -= pScrn->frameY0;
bpp = pScrn->bitsPerPixel >> 3;
- pitch = bpp * pScrn->displayWidth;
switch(id) {
case FOURCC_YV12: