diff --git a/man/sis.man b/man/sis.man index d1c510e..2b3f054 100644 --- a/man/sis.man +++ b/man/sis.man @@ -41,9 +41,9 @@ driver supports PCI and AGP video cards based on the following chipsets: .B SiS630/730 .B SiS315/H/PRO .B SiS550/551/552 -.B SiS650/651/M650/661FX/M661FX/M661MX/740/741/741GX +.B SiS650/651/M650/661FX/M661FX/M661MX/740/741/741GX/M741 .B SiS330 (Xabre) -.B SiS760 +.B SiS760/M760 .PP In the following text, the following terms are used: .PP @@ -217,9 +217,9 @@ The driver supports the following video bridges: .B SiS301LV .B SiS302(E)LV .PP -Instead of a video bridge, some machines have a +Instead of a video bridge, some machines have a third party .B LVDS -transmitter to control LCD panels, and a +transmitter to control LCD panels, and/or a .B "Chrontel 7005" or .B "7019" @@ -227,36 +227,38 @@ for TV output. All these are supported as well. .PP About TV output .PP -On the SiS301 and the Chrontel 7005, only resolutions up to 800x600 -are supported. On all others, resolutions up to 1024x768 are supported. -However, due to a hardware bug, Xvideo might be distorted on SiS video -bridges if running NTSC or PAL-M at 1024x768. +The driver fully supports standard (PAL, NTSC, PAL-N, PAL-M) S-video or +composite output as well as high definition TV (HDTV) output via YPbPr plugs. +For more information on HDTV, please consult the author's website. +.PP +As regards S-video and CVBS output, the SiS301 and the Chrontel 7005 only +support resolutions up to 800x600. All others support resolutions up to +1024x768. However, due to a hardware bug, Xvideo might be distorted on SiS +video bridges if running NTSC or PAL-M at 1024x768. .PP About XVideo support .PP XVideo is supported on all chipsets of both families. However, there are some differences in hardware features which cause limitations. -The 300 series as well as the SiS55x, M650, 651, 661FX, M661FX, and -741 support two video overlays. The SiS315/H/PRO, 650/740 and 330 support -only one such overlay. On chips with two overlays, one overlay is used -for CRT1, the other for CRT2. On the other chipsets, the option +The 300 series as well as the SiS55x, M650, 651, 661FX, M661FX, M661MX, +741, 741GX, M741, 760, M760 support two video overlays. The SiS315/H/PRO, +650/740 and 330 support only one such overlay. On chips with two overlays, +one overlay is used for CRT1, the other for CRT2. On the other chipsets, +the option .B \*qXvOnCRT2\*q can be used to select the desired output channel. .PP About Merged Framebuffer support .PP -This mode is strongly recommended over Xinerama. Please see -http://www.winischhofer.net/linuxsisvga.shtml for detailed +Merged framebuffer mode is similar to dual head/Xinerama mode, but has a +few advantages which make me recommend it strongly over Xinerama. Please +see http://www.winischhofer.net/linuxsisvga.shtml for detailed information. .PP About dual-head support .PP -Dual head mode has some limitations as regards color depth and -resolution. Due to memory bandwidth limits, CRT1 might have a -reduced maximum refresh rate if running on higher resolutions than -1280x1024. -.PP -Colordepth 8 is not supported when running in dual head mode. +Dual head mode with or without Xinerama is fully supported. Note that +colordepth 8 is not supported in dual head mode. .PP The following driver .B Options @@ -310,7 +312,8 @@ Force display type to one of: .B NONE will disable CRT2. The SVIDEO, COMPOSITE, SVIDEO+COMPOSITE and SCART parameters are for SiS video bridges only and can be used to force the -driver to use a specific TV output connector (if present). +driver to use a specific TV output connector (if present). For further +parameters, see the author's website. Default: auto detect. .TP .BI "Option \*qCRT2Gamma\*q \*q" boolean \*q @@ -371,8 +374,8 @@ more information. .PP .I "3. 300 series specific information" .PP -DRI is supported on the 300 series only. On Linux, DRI requires the -kernel's SiS framebuffer driver ( +DRI is supported on the 300 series only. On Linux, prior to kernel 2.6.3, +DRI requires the kernel's SiS framebuffer driver ( .B sisfb ) and some other modules which come with either the kernel or the X server. .PP @@ -387,6 +390,7 @@ driver. If you start sisfb with a valid mode (ie you gain a graphical console), the X driver can communicate with sisfb and doesn't require any manual configuration for finding out about the video memory it is allowed to use. +.PP However, if you are running a 2.4 series Linux kernel and use sisfb for video memory management only, ie you started sisfb with mode=none and still have a text mode console, there is no communication between sisfb and the @@ -409,6 +413,10 @@ If you started sisfb without the mem argument, sisfb will reserve If you intend to use DRI, I recommend setting the total video memory in the BIOS to 64MB in order to at least overcome the lack of memory swap functions. +.PP +As of Linux 2.6.3 and under *BSD, sisfb is not required for memory management. +Hence, this option is mandatory on such systems not running sisfb to decide +how much memory X should reserve for DRI. .TP .BI "Option \*qDRI\*q \*q" boolean \*q This option allows enabling or disabling DRI. By default, DRI is on. diff --git a/src/init301.c b/src/init301.c index 5350845..74b14ea 100644 --- a/src/init301.c +++ b/src/init301.c @@ -181,12 +181,11 @@ GetLCDStructPtr661_2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo) static BOOLEAN SiS_AdjustCRT2Rate(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, - USHORT RefreshRateTableIndex, USHORT *i, - PSIS_HW_INFO HwInfo) + USHORT RRTI, USHORT *i, PSIS_HW_INFO HwInfo) { USHORT checkmask=0,modeid,infoflag; - modeid = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex + (*i)].ModeID; + modeid = SiS_Pr->SiS_RefIndex[RRTI + (*i)].ModeID; if(SiS_Pr->SiS_VBType & VB_SISVB) { @@ -247,8 +246,8 @@ SiS_AdjustCRT2Rate(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, } /* Look backwards in table for matching CRT2 mode */ - for(; SiS_Pr->SiS_RefIndex[RefreshRateTableIndex+(*i)].ModeID == modeid; (*i)--) { - infoflag = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex + (*i)].Ext_InfoFlag; + for(; SiS_Pr->SiS_RefIndex[RRTI + (*i)].ModeID == modeid; (*i)--) { + infoflag = SiS_Pr->SiS_RefIndex[RRTI + (*i)].Ext_InfoFlag; if(infoflag & checkmask) return TRUE; if((*i) == 0) break; } @@ -257,13 +256,11 @@ SiS_AdjustCRT2Rate(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, * for a matching CRT2 mode if no mode was found yet. */ for((*i) = 0; ; (*i)++) { - if(SiS_Pr->SiS_RefIndex[RefreshRateTableIndex + (*i)].ModeID != modeid) { - return FALSE; - } - infoflag = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex + (*i)].Ext_InfoFlag; + if(SiS_Pr->SiS_RefIndex[RRTI + (*i)].ModeID != modeid) break; + infoflag = SiS_Pr->SiS_RefIndex[RRTI + (*i)].Ext_InfoFlag; if(infoflag & checkmask) return TRUE; } - return TRUE; + return FALSE; } /*********************************************/ @@ -279,7 +276,7 @@ SiS_GetRatePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00 }; - USHORT RefreshRateTableIndex,i,backup_i; + USHORT RRTI,i,backup_i; USHORT modeflag,index,temp,backupindex; /* Do NOT check for UseCustomMode here, will skrew up FIFO */ @@ -324,22 +321,22 @@ SiS_GetRatePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, } } - RefreshRateTableIndex = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].REFindex; - ModeNo = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].ModeID; + RRTI = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].REFindex; + ModeNo = SiS_Pr->SiS_RefIndex[RRTI].ModeID; if(HwInfo->jChipType >= SIS_315H) { if(!(SiS_Pr->SiS_VBInfo & DriverMode)) { if( (SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_VESAID == 0x105) || (SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_VESAID == 0x107) ) { - if(backupindex <= 1) RefreshRateTableIndex++; + if(backupindex <= 1) RRTI++; } } } i = 0; do { - if(SiS_Pr->SiS_RefIndex[RefreshRateTableIndex + i].ModeID != ModeNo) break; - temp = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex + i].Ext_InfoFlag; + if(SiS_Pr->SiS_RefIndex[RRTI + i].ModeID != ModeNo) break; + temp = SiS_Pr->SiS_RefIndex[RRTI + i].Ext_InfoFlag; temp &= ModeTypeMask; if(temp < SiS_Pr->SiS_ModeType) break; i++; @@ -348,7 +345,7 @@ SiS_GetRatePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, if(!(SiS_Pr->SiS_VBInfo & SetCRT2ToRAMDAC)) { if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) { - temp = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex + i - 1].Ext_InfoFlag; + temp = SiS_Pr->SiS_RefIndex[RRTI + i - 1].Ext_InfoFlag; if(temp & InterlaceMode) i++; } } @@ -357,12 +354,12 @@ SiS_GetRatePtr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, if((SiS_Pr->SiS_SetFlag & ProgrammingCRT2) && (!(SiS_Pr->SiS_VBInfo & DisableCRT2Display))) { backup_i = i; - if(!(SiS_AdjustCRT2Rate(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex, &i, HwInfo))) { + if(!(SiS_AdjustCRT2Rate(SiS_Pr, ModeNo, ModeIdIndex, RRTI, &i, HwInfo))) { i = backup_i; } } - return(RefreshRateTableIndex + i); + return(RRTI + i); } /*********************************************/ diff --git a/src/sis.h b/src/sis.h index 87a6b6c..ca34139 100644 --- a/src/sis.h +++ b/src/sis.h @@ -40,7 +40,7 @@ #define SISDRIVERVERSIONYEAR 4 #define SISDRIVERVERSIONMONTH 8 -#define SISDRIVERVERSIONDAY 4 +#define SISDRIVERVERSIONDAY 5 #define SISDRIVERREVISION 1 #define SISDRIVERIVERSION (SISDRIVERVERSIONYEAR << 16) | \ diff --git a/src/sis_vb.c b/src/sis_vb.c index 614a9ba..aea709e 100644 --- a/src/sis_vb.c +++ b/src/sis_vb.c @@ -158,17 +158,20 @@ SiS_SISDetectCRT1(ScrnInfoPtr pScrn) } if(pSiS->sishw_ext.jChipType >= SIS_330) { + int watchdog; if(pSiS->sishw_ext.jChipType >= SIS_340) { outSISIDXREG(SISCR, 0x57, 0x4a); } else { outSISIDXREG(SISCR, 0x57, 0x5f); } orSISIDXREG(SISCR, 0x53, 0x02); - while((inSISREG(SISINPSTAT)) & 0x01) break; - while(!((inSISREG(SISINPSTAT)) & 0x01)) break; + watchdog = 655360; + while((!((inSISREG(SISINPSTAT)) & 0x01)) && --watchdog); + watchdog = 655360; + while(((inSISREG(SISINPSTAT)) & 0x01) && --watchdog); if((inSISREG(SISMISCW)) & 0x10) temp = 1; andSISIDXREG(SISCR, 0x53, 0xfd); - andSISIDXREG(SISCR, 0x57, 0x00); + outSISIDXREG(SISCR, 0x57, 0x00); #ifdef TWDEBUG xf86DrvMsg(0, X_INFO, "330: Found CRT1: %s\n", (temp == 1) ? "yes" : "no"); #endif diff --git a/src/sis_video.c b/src/sis_video.c index ec26e69..1355b07 100644 --- a/src/sis_video.c +++ b/src/sis_video.c @@ -314,18 +314,18 @@ static XF86AttributeRec SISAttributes_300[NUM_ATTRIBUTES_300] = {XvSettable | XvGettable, 0, 1, sisxvyuvchromakey}, {XvSettable | XvGettable, 0, (1 << 24) - 1, sisxvchromamin}, {XvSettable | XvGettable, 0, (1 << 24) - 1, sisxvchromamax}, - { XvGettable, 0, 0xffffffff, sisxvqueryvbflags}, - { XvGettable, 0, 0xffffffff, sisxvsdgetdriverversion}, - { XvGettable, 0, 0xffffffff, sisxvsdgethardwareinfo}, - { XvGettable, 0, 0xffffffff, sisxvsdgetbusid}, - { XvGettable, 0, 0xffffffff, sisxvsdqueryvbflagsversion}, - { XvGettable, 0, 0xffffffff, sisxvsdgetsdflags}, - {XvSettable | XvGettable, 0, 0xffffffff, sisxvsdunlocksisdirect}, - {XvSettable , 0, 0xffffffff, sisxvsdsetvbflags}, - { XvGettable, 0, 0xffffffff, sisxvsdquerydetecteddevices}, + { XvGettable, 0, -1, sisxvqueryvbflags}, + { XvGettable, 0, -1, sisxvsdgetdriverversion}, + { XvGettable, 0, -1, sisxvsdgethardwareinfo}, + { XvGettable, 0, -1, sisxvsdgetbusid}, + { XvGettable, 0, -1, sisxvsdqueryvbflagsversion}, + { XvGettable, 0, -1, sisxvsdgetsdflags}, + {XvSettable | XvGettable, 0, -1, sisxvsdunlocksisdirect}, + {XvSettable , 0, -1, sisxvsdsetvbflags}, + { XvGettable, 0, -1, sisxvsdquerydetecteddevices}, {XvSettable | XvGettable, 0, 1, sisxvsdcrt1status}, - {XvSettable , 0, 0xffffffff, sisxvsdcheckmodeindexforcrt2}, - { XvGettable, 0, 0xffffffff, sisxvsdresultcheckmodeindexforcrt2}, + {XvSettable , 0, -1, sisxvsdcheckmodeindexforcrt2}, + { XvGettable, 0, -1, sisxvsdresultcheckmodeindexforcrt2}, {XvSettable , 0, 0, sisxvsdredetectcrt2}, {XvSettable | XvGettable, 0, 4, sisxvsdsisantiflicker}, {XvSettable | XvGettable, 0, 15, sisxvsdsissaturation}, @@ -343,7 +343,7 @@ static XF86AttributeRec SISAttributes_300[NUM_ATTRIBUTES_300] = {XvSettable | XvGettable, 0, 3, sisxvsdenablegamma}, {XvSettable | XvGettable, -16, 16, sisxvsdtvxscale}, {XvSettable | XvGettable, -4, 3, sisxvsdtvyscale}, - { XvGettable, 0, 0xffffffff, sisxvsdgetscreensize}, + { XvGettable, 0, -1, sisxvsdgetscreensize}, {XvSettable | XvGettable, 100, 10000, sisxvsdstorebrir}, {XvSettable | XvGettable, 100, 10000, sisxvsdstorebrig}, {XvSettable | XvGettable, 100, 10000, sisxvsdstorebrib}, @@ -383,18 +383,18 @@ static XF86AttributeRec SISAttributes_315[NUM_ATTRIBUTES_315] = {XvSettable | XvGettable, 0, 1, sisxvinsidechromakey}, {XvSettable | XvGettable, 0, (1 << 24) - 1, sisxvchromamin}, {XvSettable | XvGettable, 0, (1 << 24) - 1, sisxvchromamax}, - { XvGettable, 0, 0xffffffff, sisxvqueryvbflags}, - { XvGettable, 0, 0xffffffff, sisxvsdgetdriverversion}, - { XvGettable, 0, 0xffffffff, sisxvsdgethardwareinfo}, - { XvGettable, 0, 0xffffffff, sisxvsdgetbusid}, - { XvGettable, 0, 0xffffffff, sisxvsdqueryvbflagsversion}, - { XvGettable, 0, 0xffffffff, sisxvsdgetsdflags}, - {XvSettable | XvGettable, 0, 0xffffffff, sisxvsdunlocksisdirect}, - {XvSettable , 0, 0xffffffff, sisxvsdsetvbflags}, - { XvGettable, 0, 0xffffffff, sisxvsdquerydetecteddevices}, + { XvGettable, 0, -1, sisxvqueryvbflags}, + { XvGettable, 0, -1, sisxvsdgetdriverversion}, + { XvGettable, 0, -1, sisxvsdgethardwareinfo}, + { XvGettable, 0, -1, sisxvsdgetbusid}, + { XvGettable, 0, -1, sisxvsdqueryvbflagsversion}, + { XvGettable, 0, -1, sisxvsdgetsdflags}, + {XvSettable | XvGettable, 0, -1, sisxvsdunlocksisdirect}, + {XvSettable , 0, -1, sisxvsdsetvbflags}, + { XvGettable, 0, -1, sisxvsdquerydetecteddevices}, {XvSettable | XvGettable, 0, 1, sisxvsdcrt1status}, - {XvSettable , 0, 0xffffffff, sisxvsdcheckmodeindexforcrt2}, - { XvGettable, 0, 0xffffffff, sisxvsdresultcheckmodeindexforcrt2}, + {XvSettable , 0, -1, sisxvsdcheckmodeindexforcrt2}, + { XvGettable, 0, -1, sisxvsdresultcheckmodeindexforcrt2}, {XvSettable , 0, 0, sisxvsdredetectcrt2}, {XvSettable | XvGettable, 0, 4, sisxvsdsisantiflicker}, {XvSettable | XvGettable, 0, 15, sisxvsdsissaturation}, @@ -412,7 +412,7 @@ static XF86AttributeRec SISAttributes_315[NUM_ATTRIBUTES_315] = {XvSettable | XvGettable, 0, 7, sisxvsdenablegamma}, {XvSettable | XvGettable, -16, 16, sisxvsdtvxscale}, {XvSettable | XvGettable, -4, 3, sisxvsdtvyscale}, - { XvGettable, 0, 0xffffffff, sisxvsdgetscreensize}, + { XvGettable, 0, -1, sisxvsdgetscreensize}, {XvSettable | XvGettable, 100, 10000, sisxvsdstorebrir}, {XvSettable | XvGettable, 100, 10000, sisxvsdstorebrig}, {XvSettable | XvGettable, 100, 10000, sisxvsdstorebrib}, @@ -428,7 +428,7 @@ static XF86AttributeRec SISAttributes_315[NUM_ATTRIBUTES_315] = {XvSettable | XvGettable, 0, 1, sisxvsdhidehwcursor}, {XvSettable | XvGettable, 0, 15, sisxvsdpanelmode}, #ifdef TWDEBUG - {XvSettable , 0, 0xffffffff, sisxvsetreg}, + {XvSettable , 0, -1, sisxvsetreg}, #endif #ifdef SIS_CP SIS_CP_VIDEO_ATTRIBUTES