summaryrefslogtreecommitdiff
path: root/xc/programs/Xserver/hw/xfree86/drivers/trident/image_accel.c
diff options
context:
space:
mode:
Diffstat (limited to 'xc/programs/Xserver/hw/xfree86/drivers/trident/image_accel.c')
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/trident/image_accel.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/trident/image_accel.c b/xc/programs/Xserver/hw/xfree86/drivers/trident/image_accel.c
index 75b83482a..c63039ad7 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/trident/image_accel.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/trident/image_accel.c
@@ -23,7 +23,7 @@
*
* Trident 3DImage' accelerated options.
*/
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/image_accel.c,v 1.16 2000/11/03 18:46:13 eich Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/image_accel.c,v 1.21 2000/12/12 09:07:45 alanh Exp $ */
#include "xf86.h"
#include "xf86_OSproc.h"
@@ -107,27 +107,19 @@ ImageInitializeAccelerator(ScrnInfoPtr pScrn)
pTrident->EngineOperation = 2;
break;
}
- IMAGE_OUT(0x2120, 0x10000000);
- IMAGE_OUT(0x2130, 2047 << 16 | 2047);
- IMAGE_OUT(0x2120, 0x20000000);
+ IMAGE_OUT(0x2120, 0xF0000000);
IMAGE_OUT(0x2120, 0x40000000 | pTrident->EngineOperation);
- IMAGE_OUT(0x2120, 0x50000000);
- IMAGE_OUT(0x2120, 0x60000000 |pScrn->displayWidth<<16 |pScrn->displayWidth);
- IMAGE_OUT(0x2120, 0x70000000);
IMAGE_OUT(0x2120, 0x80000000);
- IMAGE_OUT(0x2120, 0xA0000000);
- IMAGE_OUT(0x2120, 0xB0000000);
- IMAGE_OUT(0x2120, 0xD0000000);
- IMAGE_OUT(0x2120, 0xE0000000);
- IMAGE_OUT(0x2130, 0x00000000);
- IMAGE_OUT(0x2120, 0xF0000000);
IMAGE_OUT(0x2144, 0x00000000);
IMAGE_OUT(0x2148, 0x00000000);
IMAGE_OUT(0x2150, 0x00000000);
IMAGE_OUT(0x2154, 0x00000000);
+ IMAGE_OUT(0x2120, 0x60000000 |pScrn->displayWidth<<16 |pScrn->displayWidth);
IMAGE_OUT(0x216C, 0x00000000);
IMAGE_OUT(0x2170, 0x00000000);
IMAGE_OUT(0x217C, 0x00000000);
+ IMAGE_OUT(0x2120, 0x10000000);
+ IMAGE_OUT(0x2130, 2047 << 16 | 2047);
pTrident->Clipping = FALSE;
pTrident->DstEnable = FALSE;
}
@@ -202,9 +194,13 @@ ImageAccelInit(ScreenPtr pScreen)
infoPtr->ClippingFlags |= HARDWARE_CLIP_COLOR_8x8_FILL;
#endif
+ if (pTrident->Chipset != CYBER9397DVD) {
+ /* It seems as though the 9397DVD doesn't like the transfer window */
+ /* But then, I've also tried at the two port addresses too, with */
+ /* no luck. Disable for this chipset for now. I'd guess there's some */
+ /* extra setup needed for this chipset. */
infoPtr->ScanlineCPUToScreenColorExpandFillFlags = NO_PLANEMASK |
LEFT_EDGE_CLIPPING |
- LEFT_EDGE_CLIPPING_NEGATIVE_X |
BIT_ORDER_IN_BYTE_MSBFIRST;
pTrident->XAAScanlineColorExpandBuffers[0] =
@@ -222,7 +218,6 @@ ImageAccelInit(ScreenPtr pScreen)
ImageSubsequentColorExpandScanline;
infoPtr->ScanlineImageWriteFlags = NO_PLANEMASK |
- LEFT_EDGE_CLIPPING_NEGATIVE_X |
LEFT_EDGE_CLIPPING;
infoPtr->SetupForScanlineImageWrite = ImageSetupForScanlineImageWrite;
@@ -237,6 +232,7 @@ ImageAccelInit(ScreenPtr pScreen)
xnfalloc(pScrn->virtualX * pScrn->bitsPerPixel / 8);
infoPtr->ImageWriteBase = pTrident->IOBase + 0x10000;
+ }
AvailFBArea.x1 = 0;
AvailFBArea.y1 = 0;
@@ -418,6 +414,9 @@ ImageSubsequentFillRectSolid(ScrnInfoPtr pScrn, int x, int y, int w, int h)
{
TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
+ if ((w<=0) || (h<=0))
+ return;
+
IMAGE_OUT(0x2108, ((y&0xfff)<<16) | (x&0xfff));
IMAGE_OUT(0x210C, (((y+h-1)&0xfff)<<16) | ((x+w-1)&0xfff));
IMAGE_OUT(0x2124, 0x80000000| 3<<22| 1<<10| 1<<9| (pTrident->Clipping?1:0));