? Makefile ? port-fixes.diff ? pre-dh-commit.diff ? savage-dri-to-xorg.diff ? savage.4.html ? savage._man ? savage_xv.patch ? xorg-savage-dualhead.diff Index: savage_streams.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_streams.c,v retrieving revision 1.8 diff -u -r1.8 savage_streams.c --- savage_streams.c 23 Nov 2004 04:42:37 -0000 1.8 +++ savage_streams.c 25 Nov 2004 18:14:11 -0000 @@ -145,6 +145,8 @@ OUTREG(PSTREAM_FBSIZE_REG, pScrn->virtualY * pScrn->virtualX * (pScrn->bitsPerPixel >> 3)); } + + OUTREG(FIFO_CONTROL, 0x18ffeL); OUTREG( PSTREAM_WINDOW_START_REG, OS_XY(0,0) ); OUTREG( PSTREAM_WINDOW_SIZE_REG, OS_WH(pScrn->displayWidth, pScrn->virtualY) ); @@ -319,10 +321,11 @@ } - OUTREG( SEC_STREAM_CKEY_LOW, 0 ); + OUTREG( SEC_STREAM_CKEY_LOW, (4L << 29) ); OUTREG( SEC_STREAM_CKEY_UPPER, 0 ); OUTREG( SEC_STREAM_HSCALING, 0 ); OUTREG( SEC_STREAM_VSCALING, 0 ); + OUTREG(SEC_STREAM2_STRIDE_LPB, 0); OUTREG( BLEND_CONTROL, 0 ); OUTREG( SEC_STREAM_FBUF_ADDR0, 0 ); OUTREG( SEC_STREAM_FBUF_ADDR1, 0 ); @@ -334,11 +337,22 @@ OUTREG( SEC_STREAM_OPAQUE_OVERLAY, 0 ); OUTREG( SEC_STREAM_STRIDE, 0 ); + /* FIFO related regs */ + OUTREG8(CRT_ADDRESS_REG,0x86); + OUTREG8(CRT_DATA_REG,0x2c); + + OUTREG8(CRT_ADDRESS_REG,0x87); + OUTREG8(CRT_DATA_REG,0xf8); + + OUTREG8(CRT_ADDRESS_REG,0x89); + OUTREG8(CRT_DATA_REG,0x40); + + /* These values specify brightness, contrast, saturation and hue. */ - OUTREG( SEC_STREAM_COLOR_CONVERT0_2000, 0x0000C892 ); - OUTREG( SEC_STREAM_COLOR_CONVERT1_2000, 0x00033400 ); - OUTREG( SEC_STREAM_COLOR_CONVERT2_2000, 0x000001CF ); - OUTREG( SEC_STREAM_COLOR_CONVERT3_2000, 0x01F1547E ); + OUTREG( SEC_STREAM_COLOR_CONVERT0_2000, 0x640092 /*0x0000C892*/ ); + OUTREG( SEC_STREAM_COLOR_CONVERT1_2000, 0x19a0000 /*0x00033400*/ ); + OUTREG( SEC_STREAM_COLOR_CONVERT2_2000, 0x001cf /*0x000001CF*/ ); + OUTREG( SEC_STREAM_COLOR_CONVERT3_2000, 0xF8CA007E /*0x01F1547E*/ ); } @@ -384,10 +398,12 @@ } VerticalRetraceWait(); - + + /* OUTREG8(CRT_ADDRESS_REG,0x67); OUTREG8(CRT_DATA_REG,(INREG8(CRT_DATA_REG)&0xf3)|0x04); - + */ + OUTREG8(CRT_ADDRESS_REG,0x65); OUTREG8(CRT_DATA_REG,INREG8(CRT_DATA_REG)|0xC0); @@ -396,8 +412,10 @@ } else { OUTREG32(PSTREAM_CONTROL_REG,0x02000000); } - OUTREG32(PSTREAM_WINDOW_SIZE_REG, 0x0); - + + /*OUTREG32(PSTREAM_WINDOW_SIZE_REG, 0x0);*/ + /*OUTREG32(PSTREAM_WINDOW_SIZE_REG, OS_WH(pScrn->displayWidth, pScrn->virtualY));*/ + } Index: savage_streams.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_streams.h,v retrieving revision 1.4 diff -u -r1.4 savage_streams.h --- savage_streams.h 16 Oct 2004 21:10:40 -0000 1.4 +++ savage_streams.h 25 Nov 2004 18:14:11 -0000 @@ -197,6 +197,15 @@ #define SEC_STREAM_COLOR_CONVERT1_2000 0x819c #define SEC_STREAM_COLOR_CONVERT2_2000 0x81e0 #define SEC_STREAM_COLOR_CONVERT3_2000 0x81e4 +#define SEC_STREAM_SRC_START_2000 0x818c +#define SEC_STREAM_SRC_SIZE_2000 0x81a8 +#define SEC_STREAM_BUFFERSIZE_2000 0x81a4 +#define S_SRC_H_Mask 0x00000fff +#define S_SRC_W_Shift 16 +#define S_SRC_W_Mask 0x0fff0000 +#define SRCSIZE(w,h) (((w <colorKey ) { OUTREG( SEC_STREAM_CKEY_LOW, 0 ); OUTREG( SEC_STREAM_CKEY_UPPER, 0 ); - OUTREG( BLEND_CONTROL, (INREG32(BLEND_CONTROL) | (psav->blendBase << 9) | 0x08 )); + OUTREG( BLEND_CONTROL, (8 << 2)); } else { switch (pScrn->depth) { @@ -583,7 +583,7 @@ } /* We assume destination colorkey */ - OUTREG( BLEND_CONTROL, (INREG32(BLEND_CONTROL) | (psav->blendBase << 9) | 0x08 )); + OUTREG( BLEND_CONTROL, (8 << 2)); } } @@ -1241,8 +1241,7 @@ { SavagePtr psav = SAVPTR(pScrn); - if( S3_SAVAGE_MOBILE_SERIES(psav->Chipset) || - (psav->Chipset == S3_SAVAGE2000) ) + if ( S3_SAVAGE_MOBILE_SERIES(psav->Chipset) ) { psav->blendBase = GetBlendForFourCC( id ); xf86ErrorFVerb(XVTRACE+1,"Format %4.4s, blend is %08x\n", (char*)&id, psav->blendBase ); @@ -1256,7 +1255,10 @@ OUTREG( BLEND_CONTROL, (INREG32(BLEND_CONTROL) | (psav->blendBase << 17) | (8 << 12) )); #endif } + } else if (psav->Chipset == S3_SAVAGE2000) { + OUTREG( BLEND_CONTROL, (INREG32(BLEND_CONTROL) | (psav->blendBase << 24) | (8 << 2))); } + psav->videoFourCC = id; } @@ -1364,12 +1366,17 @@ * bit_15 = 1: Enable vertical interpolation * 0: Line duplicaion */ - /* + /* * Vertical Interpolation is very bandwidth intensive. Some savages can't * seem to handle it. Default is line doubling. --AGD */ if (pPriv->interpolation) { - OUTREG(SSTREAM_LINES_REG, 0x8000 | src_h ); + if (src_w * 16 <= 0x3300) { + OUTREG(SSTREAM_LINES_REG, 0x8000 | src_h ); + OUTREG(FIFO_CONTROL, (INREG(FIFO_CONTROL) + 1)); + } else { + OUTREG(SSTREAM_LINES_REG, src_h ); + } } else { OUTREG(SSTREAM_LINES_REG, src_h ); } @@ -1393,7 +1400,10 @@ cr92 = VGAIN8(vgaCRReg); VGAOUT8(vgaCRReg, (cr92 & 0x40) | (pitch >> 8) | 0x80); VGAOUT8(vgaCRIndex, 0x93); - VGAOUT8(vgaCRReg, pitch); + if (psav->bTiled && (( drw_h > src_h) || (drw_w > src_w))) + VGAOUT8(vgaCRReg, pitch | 0xf); + else + VGAOUT8(vgaCRReg, pitch); } } @@ -1558,11 +1568,21 @@ vgaCRIndex = vgaIOBase + 4; vgaCRReg = vgaIOBase + 5; - if ( psav->videoFourCC != id ) { - SavageSetBlend(pScrn,id); - SavageResetVideo(pScrn); + + if( psav->videoFourCC != id ) + SavageStreamsOff(pScrn); + + if( !psav->videoFlags & VF_STREAMS_ON ) + { + SavageSetBlend(pScrn,id); + SavageStreamsOn(pScrn); + SavageResetVideo(pScrn); } + OUTREG(SEC_STREAM_SRC_START_2000, SRCSTART(x1, y1)); + OUTREG(SEC_STREAM_SRC_SIZE_2000, SRCSIZE(src_w, src_h)); + /*OUTREG(SEC_STREAM_BUFFERSIZE_2000, );*/ + /* Calculate horizontal and vertical scale factors. */ OUTREG(SEC_STREAM_HSCALING, @@ -1595,8 +1615,8 @@ SavageSetColor2000( pScrn ); #endif +#if 0 /* Set FIFO L2 on second stream. */ - /* Is CR92 shadowed for crtc2? -- AGD */ if( pPriv->lastKnownPitch != pitch ) { unsigned char cr92; @@ -1609,6 +1629,7 @@ VGAOUT8(vgaCRIndex, 0x93); VGAOUT8(vgaCRReg, pitch); } +#endif } static int @@ -1701,7 +1722,8 @@ npixels = ((((x2 + 0xffff) >> 16) + 1) & ~1) - left; left <<= 1; - offset = ((pPriv->area->box.y1 * pitch)) + (top * dstPitch); + /*offset = ((pPriv->area->box.y1 * pitch)) + (top * dstPitch);*/ + offset = pPriv->area->box.y1 * psav->lDelta; dst_start = (psav->FBBase + ((offset + left) & ~BASE_PAD)); switch(id) {