summaryrefslogtreecommitdiff
path: root/src/savage_streams.c
diff options
context:
space:
mode:
authorAlex Deucher <agd5f@yahoo.com>2004-10-16 21:10:40 +0000
committerAlex Deucher <agd5f@yahoo.com>2004-10-16 21:10:40 +0000
commit352b7566ac11a13bbced74d8a9c8ff944525c097 (patch)
tree2944ee1083af89be3368cfa30ff7d7a2a67e6ef2 /src/savage_streams.c
parent16af70368f042d6a5c54e57affe7c2e00f782baf (diff)
- fix savage2000, savage3D
- attempt to fix Xv on savage2000 (not there yet)
Diffstat (limited to 'src/savage_streams.c')
-rw-r--r--src/savage_streams.c61
1 files changed, 59 insertions, 2 deletions
diff --git a/src/savage_streams.c b/src/savage_streams.c
index 1b865aa..f29623a 100644
--- a/src/savage_streams.c
+++ b/src/savage_streams.c
@@ -302,6 +302,48 @@ SavageInitStreamsNew(ScrnInfoPtr pScrn)
}
}
+static void
+SavageInitStreams2000(ScrnInfoPtr pScrn)
+{
+ SavagePtr psav = SAVPTR(pScrn);
+ /*unsigned long jDelta;*/
+
+ xf86ErrorFVerb(STREAMS_TRACE, "SavageInitStreams\n" );
+
+ OUTREG(PRI_STREAM_BUFFERSIZE,
+ pScrn->virtualX * pScrn->virtualY * (pScrn->bitsPerPixel >> 3));
+
+ if (psav->FBStart2nd) {
+ unsigned long jDelta = pScrn->displayWidth;
+ OUTREG( PRI_STREAM_BUFFERSIZE, jDelta * pScrn->virtualY >> 3 );
+ OUTREG( PRI_STREAM_FBUF_ADDR0, pScrn->fbOffset );
+ OUTREG( PRI_STREAM_STRIDE, jDelta );
+ }
+
+
+ OUTREG( SEC_STREAM_CKEY_LOW, 0 );
+ OUTREG( SEC_STREAM_CKEY_UPPER, 0 );
+ OUTREG( SEC_STREAM_HSCALING, 0 );
+ OUTREG( SEC_STREAM_VSCALING, 0 );
+ OUTREG( BLEND_CONTROL, 0 );
+ OUTREG( SEC_STREAM_FBUF_ADDR0, 0 );
+ OUTREG( SEC_STREAM_FBUF_ADDR1, 0 );
+ OUTREG( SEC_STREAM_FBUF_ADDR2, 0 );
+ OUTREG( SEC_STREAM_WINDOW_START, 0 );
+ OUTREG( SEC_STREAM_WINDOW_SZ, 0 );
+/* OUTREG( SEC_STREAM_BUFFERSIZE, 0 ); */
+ OUTREG( SEC_STREAM_TILE_OFF, 0 );
+ OUTREG( SEC_STREAM_OPAQUE_OVERLAY, 0 );
+ OUTREG( SEC_STREAM_STRIDE, 0 );
+
+ /* 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 );
+
+}
+
/*
* Function to get lcd factor, display offset for overlay use
* Input: pScrn; Output: x,yfactor, displayoffset in pScrn
@@ -465,8 +507,7 @@ SavageStreamsOn(ScrnInfoPtr pScrn)
VGAOUT8( vgaCRIndex, EXT_MISC_CTRL2 );
- if( S3_SAVAGE_MOBILE_SERIES(psav->Chipset) ||
- (psav->Chipset == S3_SAVAGE2000) )
+ if( S3_SAVAGE_MOBILE_SERIES(psav->Chipset) )
{
SavageInitStreamsNew( pScrn );
@@ -517,6 +558,22 @@ SavageStreamsOn(ScrnInfoPtr pScrn)
#endif
}
}
+ else if (psav->Chipset == S3_SAVAGE2000)
+ {
+ SavageInitStreams2000( pScrn );
+
+ jStreamsControl = VGAIN8( vgaCRReg ) | ENABLE_STREAM1;
+
+ /* Wait for VBLANK. */
+ VerticalRetraceWait();
+ /* Fire up streams! */
+ VGAOUT16( vgaCRIndex, (jStreamsControl << 8) | EXT_MISC_CTRL2 );
+ /* 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 );
+ }
else
{
jStreamsControl = VGAIN8( vgaCRReg ) | ENABLE_STREAMS_OLD;