XFree86 4.3.99.901 (RC 1)

parent abe805c8
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/init.c,v 1.37 2003/11/20 19:53:20 twini Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/init.c,v 1.39 2003/12/02 16:44:36 twini Exp $ */
/*
* Mode initializing code (CRT1 section) for
* for SiS 300/305/540/630/730 and
......@@ -916,7 +916,8 @@ SiS_GetModeID_LCD(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay,
case 1280:
if(VDisplay == 1024) ModeIndex = ModeIndex_1280x1024[Depth];
else if(VDisplay == 768) {
if((LCDheight != 1050) && (LCDheight != 960)) {
if((LCDheight == 768) ||
((LCDheight == 1024) && (VBFlags & (VB_301|VB_301B|VB_301C|VB_302B)))) {
if(VGAEngine == SIS_300_VGA) {
ModeIndex = ModeIndex_300_1280x768[Depth];
} else {
......@@ -924,7 +925,8 @@ SiS_GetModeID_LCD(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay,
}
}
} else if(VDisplay == 960) {
if((LCDheight != 1050) && (LCDheight != 768)) {
if((LCDheight == 960) ||
((LCDheight == 1024) && (VBFlags & (VB_301|VB_301B|VB_301C|VB_302B)))) {
ModeIndex = ModeIndex_1280x960[Depth];
}
}
......@@ -932,7 +934,9 @@ SiS_GetModeID_LCD(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay,
case 1400:
if(VGAEngine == SIS_315_VGA) {
if(VBFlags & (VB_301B | VB_301C | VB_302B | VB_302LV | VB_302ELV)) {
if(VDisplay == 1050) ModeIndex = ModeIndex_1400x1050[Depth];
if(LCDheight != 1200) {
if(VDisplay == 1050) ModeIndex = ModeIndex_1400x1050[Depth];
}
}
}
break;
......@@ -996,7 +1000,7 @@ SiS_GetModeID_TV(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int D
else if(VDisplay == 400) ModeIndex = ModeIndex_640x400[Depth];
break;
case 720:
if(!(VBFlags & (TV_HIVISION | TV_HIVISION_LV))) {
if(!(VBFlags & (TV_HIVISION | TV_YPBPR))) {
if(VDisplay == 480) {
if((VBFlags & TV_NTSC) || (VBFlags & TV_PALM))
ModeIndex = ModeIndex_720x480[Depth];
......@@ -1007,7 +1011,7 @@ SiS_GetModeID_TV(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int D
}
break;
case 768:
if(!(VBFlags & (TV_HIVISION | TV_HIVISION_LV))) {
if(!(VBFlags & (TV_HIVISION | TV_YPBPR))) {
if((VBFlags & TV_PAL) && (!(VBFlags & TV_PALM))) {
if(VDisplay == 576) ModeIndex = ModeIndex_768x576[Depth];
}
......@@ -1016,7 +1020,7 @@ SiS_GetModeID_TV(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int D
case 800:
if(VDisplay == 600) ModeIndex = ModeIndex_800x600[Depth];
else if(VDisplay == 480) {
if(VBFlags & (TV_HIVISION | TV_HIVISION_LV)) {
if(VBFlags & (TV_HIVISION | TV_YPBPR)) {
ModeIndex = ModeIndex_800x480[Depth];
}
}
......@@ -1027,13 +1031,13 @@ SiS_GetModeID_TV(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay, int D
ModeIndex = ModeIndex_1024x768[Depth];
}
} else if(VDisplay == 576) {
if(VBFlags & (TV_HIVISION | TV_HIVISION_LV)) {
if(VBFlags & (TV_HIVISION | TV_YPBPR)) {
ModeIndex = ModeIndex_1024x576[Depth];
}
}
break;
case 1280:
if(VBFlags & (TV_HIVISION | TV_HIVISION_LV)) {
if(VBFlags & (TV_HIVISION | TV_YPBPR)) {
if(VDisplay == 720) ModeIndex = ModeIndex_1280x720[Depth];
else if(VDisplay == 1024) ModeIndex = ModeIndex_1280x1024[Depth];
}
......@@ -1368,7 +1372,6 @@ SiSSetLVDSetc(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
SiS_Pr->SiS_IF_DEF_LVDS = 0;
SiS_Pr->SiS_IF_DEF_TRUMPION = 0;
SiS_Pr->SiS_IF_DEF_CH70xx = 0;
SiS_Pr->SiS_IF_DEF_HiVision = 0;
SiS_Pr->SiS_IF_DEF_DSTN = 0;
SiS_Pr->SiS_IF_DEF_FSTN = 0;
SiS_Pr->SiS_IF_DEF_CONEX = 0;
......@@ -3626,7 +3629,7 @@ SiSSetMode(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo,USHORT ModeNo)
/* Get VB information (connectors, connected devices) */
SiS_GetVBInfo(SiS_Pr, ModeNo, ModeIdIndex, HwInfo, (SiS_Pr->UseCustomMode) ? 0 : 1);
SiS_SetHiVision(SiS_Pr, HwInfo);
SiS_SetYPbPr(SiS_Pr, HwInfo);
SiS_SetTVMode(SiS_Pr, ModeNo, ModeIdIndex, HwInfo);
SiS_GetLCDResInfo(SiS_Pr, ModeNo, ModeIdIndex, HwInfo);
SiS_SetLowModeTest(SiS_Pr, ModeNo, HwInfo);
......@@ -3927,7 +3930,7 @@ SiSBIOSSetModeCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, ScrnInfoPtr pScrn,
/* If this is a custom mode, we don't check the modeflag for CRT2Mode */
SiS_GetVBInfo(SiS_Pr, ModeNo, ModeIdIndex, HwInfo, 0);
}
SiS_SetHiVision(SiS_Pr, HwInfo);
SiS_SetYPbPr(SiS_Pr, HwInfo);
SiS_SetTVMode(SiS_Pr, ModeNo, ModeIdIndex, HwInfo);
SiS_GetLCDResInfo(SiS_Pr, ModeNo, ModeIdIndex, HwInfo);
SiS_SetLowModeTest(SiS_Pr, ModeNo, HwInfo);
......@@ -4071,7 +4074,7 @@ SiSBIOSSetModeCRT1(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, ScrnInfoPtr pScrn,
/* Get VB information (connectors, connected devices) */
/* (We don't care if the current mode is a CRT2 mode) */
SiS_GetVBInfo(SiS_Pr, ModeNo, ModeIdIndex, HwInfo, 0);
SiS_SetHiVision(SiS_Pr, HwInfo);
SiS_SetYPbPr(SiS_Pr, HwInfo);
SiS_SetTVMode(SiS_Pr, ModeNo, ModeIdIndex, HwInfo);
SiS_GetLCDResInfo(SiS_Pr, ModeNo, ModeIdIndex, HwInfo);
SiS_SetLowModeTest(SiS_Pr, ModeNo, HwInfo);
......
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/init.h,v 1.35 2003/11/20 19:53:21 twini Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/init.h,v 1.37 2003/12/02 12:15:30 twini Exp $ */
/*
* Data and prototypes for init.c
*
......@@ -879,6 +879,11 @@ static const SiS_LCDDataStruct SiS_LCD1280x960Data[] =
{ 1, 1,1800,1000,1800,1000}
};
/* 1280x768 panel data from Fujitsu 7911 (VL-17WDX8).
* Other 1280x768 panels (with clock != 81000, HTxVT != 1688x802)
* will be treated as custom panels.
*/
static const SiS_LCDDataStruct SiS_StLCD1280x768Data[] =
{
{ 211, 100, 2100, 408, 1688, 802 }, /* These values are *wrong* */
......@@ -889,7 +894,7 @@ static const SiS_LCDDataStruct SiS_StLCD1280x768Data[] =
{ 211, 72, 1008, 609, 1688, 802 },
{ 211, 128, 1400, 776, 1688, 802 },
{ 211, 205, 1680, 1041, 1688, 802 },
{ 1, 1, 1688, 802, 1688, 802 } /* That's the only one that *might* be correct */
{ 1, 1, 1688, 802, 1688, 802 } /* That's the only one that is correct */
};
static const SiS_LCDDataStruct SiS_ExtLCD1280x768Data[] =
......@@ -902,11 +907,11 @@ static const SiS_LCDDataStruct SiS_ExtLCD1280x768Data[] =
{ 211, 72, 1008, 609, 1688, 802 },
{ 211, 128, 1400, 776, 1688, 802 },
{ 211, 205, 1680, 1041, 1688, 802 },
{ 1, 1, 1688, 802, 1688, 802 } /* That's the only one that *might* be correct */
{ 1, 1, 1688, 802, 1688, 802 } /* That's the only one that is correct */
};
static const SiS_LCDDataStruct SiS_NoScaleData1280x768[] =
{ /* All values guessed */
{
{ 1, 1, 1688, 802, 1688, 802},
{ 1, 1, 1688, 802, 1688, 802},
{ 1, 1, 1688, 802, 1688, 802},
......@@ -2763,7 +2768,7 @@ extern void SiS_GetVBInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeId
PSIS_HW_INFO HwInfo, int chkcrt2mode);
extern void SiS_GetLCDResInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
PSIS_HW_INFO HwInfo);
extern void SiS_SetHiVision(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
extern void SiS_SetYPbPr(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
extern void SiS_SetTVMode(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo);
extern void SiS_UnLockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
extern void SiS_LockCRT2(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
......
This diff is collapsed.
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/init301.h,v 1.33 2003/11/20 19:53:23 twini Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/init301.h,v 1.35 2003/12/02 12:15:32 twini Exp $ */
/*
* Data and prototypes for init301.c
*
......@@ -65,7 +65,7 @@
#endif
#endif
const UCHAR SiS_HiVisionTable[3][64] = {
const UCHAR SiS_YPbPrTable[3][64] = {
{
0x17, 0x1d, 0x03, 0x09, 0x05, 0x06, 0x0c, 0x0c,
0x94, 0x49, 0x01, 0x0a, 0x06, 0x0d, 0x04, 0x0a,
......@@ -206,7 +206,7 @@ void SiS_SetChrontelGPIO(SiS_Private *SiS_Pr, USHORT myvbinfo);
void SiS_GetVBInfo(SiS_Private *SiS_Pr, USHORT ModeNo,
USHORT ModeIdIndex,PSIS_HW_INFO HwInfo,
int checkcrt2mode);
void SiS_SetHiVision(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
void SiS_SetYPbPr(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo);
void SiS_SetTVMode(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo);
void SiS_GetLCDResInfo(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex, PSIS_HW_INFO HwInfo);
USHORT SiS_GetVCLK2Ptr(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
......
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/initdef.h,v 1.24 2003/11/19 00:49:03 twini Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/initdef.h,v 1.26 2003/11/29 12:08:02 twini Exp $ */
/*
* Global definitions for init.c and init301.c
*
......@@ -75,8 +75,9 @@
#define SetCRT2ToSCART 0x0010
#define SetCRT2ToLCD 0x0020
#define SetCRT2ToRAMDAC 0x0040
#define SetCRT2ToHiVisionTV 0x0080
#define SetCRT2ToTV 0x009C /* alias */
#define SetCRT2ToYPbPr 0x0080 /* Needs change in sis_vga.c if changed (GPIO) */
#define SetCRT2ToTV (SetCRT2ToYPbPr | SetCRT2ToSCART | SetCRT2ToSVIDEO | SetCRT2ToAVIDEO)
#define SetCRT2ToTVNoYPbPr (SetCRT2ToSCART | SetCRT2ToSVIDEO | SetCRT2ToAVIDEO)
#define SetNTSCTV 0x0000 /* CR 31 */
#define SetPALTV 0x0100 /* Deprecated here, now in TVMode */
#define SetInSlaveMode 0x0200
......@@ -120,8 +121,9 @@
#define SupportTV 0x0008
#define SupportTV1024 0x0800
#define SupportCHTV 0x0800
#define SupportHiVisionTV 0x0010
#define SupportHiVisionTV2 0x1000
#define Support64048060Hz 0x0800 /* Special for 640x480 LCD */
#define SupportYPbPr 0x0010
#define SupportYPbPr2 0x1000
#define SupportLCD 0x0020
#define SupportRAMDAC2 0x0040 /* All (<= 100Mhz) */
#define SupportRAMDAC2_135 0x0100 /* All except DH (<= 135Mhz) */
......@@ -154,6 +156,13 @@
#define TVRPLLDIV2XO 0x1000
#define TVSetNTSC1024 0x2000
/* YPbPr flag (YPbPr not supported yet) */
#define YPbPr750 0x0001 /* 750p (must be a single bit, checked logially) */
#define YPbPr525 0x0002 /* 525p (must be a single bit, checked logially) */
#define YPbPrHiVision 0x0003 /* old HiVision */
#define YPbPrModeMask (YPbPr750 | YPbPr525 | YPbPrHiVision)
#define YPbPrSetSVideo 0x0004 /* (sets SVIDEO flag) */
/* SysFlags (to identify special versions) */
#define SF_Is651 0x0001
#define SF_IsM650 0x0002
......@@ -243,14 +252,15 @@
#define LCDSyncShift 6
/* CR38 (315 series) */
#define EnableDualEdge 0x01
#define SetToLCDA 0x02 /* LCD channel A (302B/30xLV and 650+LVDS only) */
#define EnableSiSHiVision 0x04 /* HiVision (HDTV) on SiS bridge */
#define EnableLVDSScart 0x04 /* Scart on Ch7019 (unofficial definition - TW) */
#define EnableLVDSHiVision 0x08 /* YPbPr color format (480i HDTV); only on 650/Ch7019 systems */
#define EnableHiVision750 0x08 /* Enable 750P HiVision mode (30xLV only) */
#define EnableHiVision525 0x10 /* Enable 525P HiVision mode (30xLV only) */
#define SiSHiVision2 0x20 /* ? - | --- mask 0x38 combinations have different meaning! */
#define EnableDualEdge 0x01
#define SetToLCDA 0x02 /* LCD channel A (301C/302B/30x(E)LV and 650+LVDS only) */
#define EnableSiSYPbPr 0x04 /* YPbPr on SiS bridge (not used) */
#define EnableCHScart 0x04 /* Scart on Ch7019 (unofficial definition - TW) */
#define EnableCHYPbPr 0x08 /* YPbPr on Ch7019 (480i HDTV); only on 650/Ch7019 systems */
#define EnableYPbPr750 0x08 /* Enable 750P YPbPr mode (30xLV/301C only) (not supported) */
#define EnableYPbPr525 0x10 /* Enable 525P YPbPr mode (30xLV/301C only) (not supported) */
#define EnableYPbPrHiVision 0x18 /* Enable HiVision (not supported) */
#define EnableYPbPrsetSVideo 0x20 /* Enable YPbPr and set SVideo */
#define EnablePALM 0x40 /* 1 = Set PALM */
#define EnablePALN 0x80 /* 1 = Set PALN */
#define EnableNTSCJ EnablePALM /* Not BIOS */
......
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis.h,v 1.88 2003/11/20 19:53:23 twini Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis.h,v 1.93 2003/12/02 12:15:32 twini Exp $ */
/*
* Main global data and definitions
*
......@@ -35,8 +35,8 @@
#define UNLOCK_ALWAYS
#define SISDRIVERVERSIONYEAR 3
#define SISDRIVERVERSIONMONTH 11
#define SISDRIVERVERSIONDAY 19
#define SISDRIVERVERSIONMONTH 12
#define SISDRIVERVERSIONDAY 2
#define SISDRIVERREVISION 1
#define SISDRIVERIVERSION (SISDRIVERVERSIONYEAR << 16) | (SISDRIVERVERSIONMONTH << 8) \
......@@ -181,9 +181,9 @@
#define DISPTYPE_DISP2 CRT2_ENABLE
#define TV_NTSC 0x00000010
#define TV_PAL 0x00000020
#define TV_HIVISION 0x00000040
#define TV_HIVISION_LV 0x00000080
#define TV_TYPE (TV_NTSC | TV_PAL | TV_HIVISION | TV_HIVISION_LV)
#define TV_HIVISION 0x00000040 /* Not supported */
#define TV_YPBPR 0x00000080 /* Not supported */
#define TV_TYPE (TV_NTSC | TV_PAL | TV_HIVISION | TV_YPBPR)
#define TV_AVIDEO 0x00000100
#define TV_SVIDEO 0x00000200
#define TV_SCART 0x00000400
......@@ -379,7 +379,7 @@ typedef struct {
unsigned char sisCapt[0x60];
unsigned char sisVid[0x50];
unsigned char VBPart1[0x50];
unsigned char VBPart2[0x50];
unsigned char VBPart2[0x100];
unsigned char VBPart3[0x50];
unsigned char VBPart4[0x50];
unsigned short ch70xx[64];
......@@ -455,7 +455,6 @@ typedef struct {
int OptTVSOver;
int OptROMUsage;
int OptUseOEM;
int PDC;
Bool NoAccel;
int forceCRT1;
int DSTN, FSTN;
......@@ -796,6 +795,9 @@ typedef struct {
unsigned char sisfblcda;
int sisfbscalelcd;
unsigned long sisfbspecialtiming;
BOOL sisfb_haveemi;
unsigned char sisfb_emi30,sisfb_emi31,sisfb_emi32,sisfb_emi33;
int EMI;
int NoYV12; /* Disable Xv YV12 support (old series) */
unsigned char postVBCR32;
int newFastVram; /* Replaces FastVram */
......
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_dac.c,v 1.49 2003/11/19 21:27:41 twini Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_dac.c,v 1.51 2003/11/30 22:29:52 twini Exp $ */
/*
* DAC helper functions (Save/Restore, MemClk, etc)
*
......@@ -1037,13 +1037,14 @@ SiS301BSave(ScrnInfoPtr pScrn, SISRegPtr sisReg)
SISPtr pSiS = SISPTR(pScrn);
int Part1max, Part2max, Part3max, Part4max;
Part1max = 0x37; /* 0x23, but we also need 2c-2e, 35-37 */
Part1max = 0x4c;
Part2max = 0x4d;
Part3max = 0x3e;
if(pSiS->VBFlags & (VB_301LV|VB_302LV|VB_302ELV))
Part4max = 0x23;
if(pSiS->VBFlags & (VB_301C|VB_302ELV))
Part2max = 0xff;
if(pSiS->VBFlags & (VB_301C|VB_301LV|VB_302LV|VB_302ELV))
Part4max = 0x34;
else
Part4max = 0x23;
SiSVBSave(pScrn, sisReg, Part1max, Part2max, Part3max, Part4max);
......@@ -1061,10 +1062,11 @@ SiS301BRestore(ScrnInfoPtr pScrn, SISRegPtr sisReg)
Part1max = 0x23;
Part2max = 0x4d;
Part3max = 0x3e;
Part4max = 0x22;
if(pSiS->VBFlags & (VB_301C|VB_302ELV))
Part2max = 0xff;
if(pSiS->VBFlags & (VB_301LV|VB_302LV|VB_302ELV))
Part4max = 0x24;
else
Part4max = 0x22;
SiS_DisableBridge(pSiS->SiS_Pr, &pSiS->sishw_ext);
......@@ -1393,7 +1395,7 @@ SiSMclk(SISPtr pSiS)
* For VGA2, we share the bandwith equally.
*/
static int
SiSEstimateCRT2Clock(ScrnInfoPtr pScrn)
SiSEstimateCRT2Clock(ScrnInfoPtr pScrn, BOOLEAN IsForMergedFBCRT2)
{
SISPtr pSiS = SISPTR(pScrn);
......@@ -1404,7 +1406,11 @@ SiSEstimateCRT2Clock(ScrnInfoPtr pScrn)
return 65000;
else if(pSiS->VBLCDFlags & VB_LCD_1280x768)
return 81000;
else if(pSiS->VBLCDFlags & (VB_LCD_1280x1024 | VB_LCD_1280x960 | VB_LCD_1400x1050))
else if(pSiS->VBLCDFlags & VB_LCD_1400x1050) {
/* Must fake clock; built-in mode shows 122 for VGA, but uses only 108 for LCD */
if(IsForMergedFBCRT2) return 123000;
else return 108000;
} else if(pSiS->VBLCDFlags & (VB_LCD_1280x1024 | VB_LCD_1280x960))
return 108000;
else if(pSiS->VBLCDFlags & VB_LCD_1600x1200)
return 162000;
......@@ -1538,7 +1544,7 @@ int SiSMemBandWidth(ScrnInfoPtr pScrn, BOOLEAN IsForCRT2)
301B anyway */
crt2used = 0.0;
crt2clock = SiSEstimateCRT2Clock(pScrn);
crt2clock = SiSEstimateCRT2Clock(pScrn, IsForCRT2);
if(crt2clock) {
crt2used = crt2clock + 2000;
}
......
This diff is collapsed.
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_driver.h,v 1.27 2003/11/19 00:49:05 twini Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_driver.h,v 1.29 2003/11/29 12:08:02 twini Exp $ */
/*
* Global data and definitions
*
......@@ -141,24 +141,24 @@ const customttable mycustomttable[] = {
"Inventec (Compaq)", "3017cl/3045US", CUT_COMPAQ12802, "COMPAQ_1280"
},
{ SIS_650, "", "",
0,
0, /* Special 1024x768 / dual link */
{ 0x00c, 0, 0, 0, 0 },
{ 'e' , 0, 0, 0, 0 },
0x1558, 0x0287,
"Clevo", "L285/L287 (Version 1)", CUT_CLEVO1024, "CLEVO_L28X_1"
},
{ SIS_650, "", "",
0,
0, /* Special 1024x768 / single link */
{ 0x00c, 0, 0, 0, 0 },
{ 'y' , 0, 0, 0, 0 },
0x1558, 0x0287,
"Clevo", "L285/L287 (Version 2)", CUT_CLEVO10242, "CLEVO_L28X_2"
},
{ SIS_650, "", "",
0,
0, /* Special 1400x1050 */
{ 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0 },
0x1558, 0x0400, /* possibly 401 and 402 as well; not panelsize specific (?) */
0x1558, 0x0400, /* possibly 401 and 402 as well; not panelsize specific? */
"Clevo", "D400S/D410S/D400H/D410H", CUT_CLEVO1400, "CLEVO_D4X0"
},
{ SIS_650, "", "",
......@@ -196,6 +196,34 @@ const customttable mycustomttable[] = {
0x1043, 0x1612,
"Asus", "L3000D/L3500D", CUT_ASUSL3000D, "ASUS_L3X00"
},
{ SIS_650, "1.10.9k", "",
0, /* For EMI */
{ 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0 },
0x1025, 0x0028,
"Acer", "Aspire 1700", CUT_ACER1280, "ACER_ASPIRE1700"
},
{ SIS_650, "1.10.7w", "",
0, /* For EMI */
{ 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0 },
0x14c0, 0x0012,
"Compal", "??? (V1)", CUT_COMPAL1400_1, "COMPAL_1400_1"
},
{ SIS_650, "1.10.7x", "",
0, /* For EMI */
{ 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0 },
0x14c0, 0x0012,
"Compal", "??? (V2)", CUT_COMPAL1400_2, "COMPAL_1400_2"
},
{ SIS_650, "1.10.8o", "",
0, /* For EMI (unknown) */
{ 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0 },
0x1043, 0x1612,
"Asus", "A2H", CUT_ASUSA2H, "ASUS_A2H"
},
{ 4321, "", "", /* never autodetected */
0,
{ 0, 0, 0, 0, 0 },
......
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_opt.c,v 1.45 2003/11/11 18:04:31 twini Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_opt.c,v 1.49 2003/12/02 12:15:33 twini Exp $ */
/*
* SiS driver option evaluation
*
......@@ -58,6 +58,7 @@ typedef enum {
OPTION_FORCECRT1,
OPTION_XVONCRT2,
OPTION_PDC,
OPTION_EMI,
OPTION_TVSTANDARD,
OPTION_USEROMDATA,
OPTION_NOINTERNALMODES,
......@@ -160,6 +161,9 @@ static const OptionInfoRec SISOptions[] = {
{ OPTION_FORCECRT1, "ForceCRT1", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_XVONCRT2, "XvOnCRT2", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_PDC, "PanelDelayCompensation", OPTV_INTEGER, {0}, -1 },
{ OPTION_EMI, "EMI", OPTV_INTEGER, {0}, -1 },
{ OPTION_LVDSHL, "LVDSHL", OPTV_INTEGER, {0}, -1 },
{ OPTION_SPECIALTIMING, "SpecialTiming", OPTV_STRING, {0}, -1 },
{ OPTION_TVSTANDARD, "TVStandard", OPTV_STRING, {0}, -1 },
{ OPTION_USEROMDATA, "UseROMData", OPTV_BOOLEAN, {0}, -1 },
{ OPTION_NOINTERNALMODES, "NoInternalModes", OPTV_BOOLEAN, {0}, FALSE },
......@@ -218,8 +222,6 @@ static const OptionInfoRec SISOptions[] = {
{ OPTION_XVMEMCPY, "XvUseMemcpy", OPTV_BOOLEAN, {0}, -1 },
{ OPTION_SCALELCD, "ScaleLCD", OPTV_BOOLEAN, {0}, -1 },
{ OPTION_ENABLEHOTKEY, "EnableHotkey", OPTV_BOOLEAN, {0}, -1 },
{ OPTION_SPECIALTIMING, "SpecialTiming", OPTV_STRING, {0}, -1 },
{ OPTION_LVDSHL, "LVDSHL", OPTV_INTEGER, {0}, -1 },
{ OPTION_ENABLESISCTRL, "EnableSiSCtrl", OPTV_BOOLEAN, {0}, -1 },
#ifdef SISMERGED
{ OPTION_MERGEDFB, "MergedFB", OPTV_BOOLEAN, {0}, FALSE },
......@@ -235,7 +237,7 @@ static const OptionInfoRec SISOptions[] = {
{ OPTION_MERGEDDPI, "MergedDPI", OPTV_STRING, {0}, FALSE },
#ifdef SISXINERAMA
{ OPTION_NOSISXINERAMA, "NoMergedXinerama", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_NOSISXINERAMA2, "NoTwinviewXineramaInfo", OPTV_BOOLEAN, {0}, FALSE }, /* alias */
{ OPTION_NOSISXINERAMA2, "NoTwinviewXineramaInfo", OPTV_BOOLEAN, {0}, FALSE }, /* alias */
{ OPTION_CRT2ISSCRN0, "MergedXineramaCRT2IsScreen0",OPTV_BOOLEAN,{0},FALSE },
#endif
#endif
......@@ -250,7 +252,6 @@ SiSOptions(ScrnInfoPtr pScrn)
{
SISPtr pSiS = SISPTR(pScrn);
MessageType from;
/* double temp; */
char *strptr;
static const char *mybadparm = "\"%s\" is is not a valid parameter for option \"%s\"\n";
static const char *disabledstr = "disabled";
......@@ -271,7 +272,6 @@ SiSOptions(ScrnInfoPtr pScrn)
pSiS->newFastVram = -1;
pSiS->NoHostBus = FALSE;
/* pSiS->UsePCIRetry = TRUE; */
pSiS->TurboQueue = TRUE;
#ifdef SISVRAMQ
/* TODO: Option (315 series VRAM command queue) */
......@@ -282,7 +282,7 @@ SiSOptions(ScrnInfoPtr pScrn)
pSiS->HWCursor = TRUE;
pSiS->Rotate = FALSE;
pSiS->ShadowFB = FALSE;
pSiS->loadDRI = TRUE;
pSiS->loadDRI = FALSE;
pSiS->agpWantedPages = AGP_PAGES;
pSiS->VESA = -1;
pSiS->NoXvideo = FALSE;
......@@ -293,6 +293,7 @@ SiSOptions(ScrnInfoPtr pScrn)
pSiS->XvOnCRT2 = FALSE;
pSiS->NoYV12 = -1;
pSiS->PDC = -1;
pSiS->EMI = -1;
pSiS->OptTVStand = -1;
pSiS->OptROMUsage = -1;
pSiS->noInternalModes = FALSE;
......@@ -394,6 +395,14 @@ SiSOptions(ScrnInfoPtr pScrn)
pSiS->HWCursor = FALSE;
}
/* DRI only supported on 300 series,
* so don't load DRI by default on
* others.
*/
if(pSiS->VGAEngine == SIS_300_VGA) {
pSiS->loadDRI = TRUE;
}
#if XF86_VERSION_CURRENT < XF86_VERSION_NUMERIC(4,2,99,0,0)
pSiS->OptUseColorCursor = 0;
#else
......@@ -405,6 +414,7 @@ SiSOptions(ScrnInfoPtr pScrn)
pSiS->OptUseColorCursor = 1;
}
#endif
if(pSiS->VGAEngine == SIS_300_VGA) {
pSiS->AllowHotkey = 0;
} else if(pSiS->VGAEngine == SIS_315_VGA) {
......@@ -732,6 +742,9 @@ SiSOptions(ScrnInfoPtr pScrn)
if(xf86GetOptValInteger(pSiS->Options, OPTION_PDC, &vali)) {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING, mystring, "PanelDelayCompensation");
}
if(xf86GetOptValInteger(pSiS->Options, OPTION_EMI, &vali)) {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING, mystring, "EMI");
}
if(xf86GetOptValString(pSiS->Options, OPTION_SPECIALTIMING)) {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING, mystring, "SpecialTiming");
}
......@@ -911,7 +924,7 @@ SiSOptions(ScrnInfoPtr pScrn)
/* ForceCRT1Type (315/330 series only)
* Used for forcing the driver to initialize CRT1 as
* VGA (analog) or LCDA (for simultanious LCD and TV
* display) - on M650/651 with 30xLV only!
* display) - on M650/651 and 661 or later with 301C/30xLV only!
*/
if(pSiS->VGAEngine == SIS_315_VGA) {
strptr = (char *)xf86GetOptValString(pSiS->Options, OPTION_FORCE_CRT1TYPE);
......@@ -1104,6 +1117,28 @@ SiSOptions(ScrnInfoPtr pScrn)
}
}
/* EMI (315/330 series + 302LV/302ELV bridge only)
* This might be required if the LCD panel loses sync on
* mode switches. So far, this problem should not show up
* due to the auto-detection (from reading the values set
* by the BIOS; however, the BIOS values are wrong sometimes
* such as in the case of some Compal machines with a
* 1400x1050, or some Inventec(Compaq) machines with a
* 1280x1024 panel.
* The parameter is an integer from 0 to 0x60ffffff.
*/
if(xf86GetOptValInteger(pSiS->Options, OPTION_EMI, &pSiS->EMI)) {
if((pSiS->EMI < 0) || (pSiS->EMI > 0x60ffffff)) {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"Illegal EMI parameter, valid is 0 through 0x60ffffff\n");
pSiS->EMI = -1;
} else {
pSiS->EMI &= 0x60ffffff;
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
"EMI will be 0x%04x\n", pSiS->EMI);
}
}
}
......@@ -1158,7 +1193,7 @@ SiSOptions(ScrnInfoPtr pScrn)
/* CHTVType (315/330 series only)
* Used for telling the driver if the TV output shall
* be i480 HDTV or SCART.
* be 480i HDTV or SCART.
*/
if(pSiS->VGAEngine == SIS_315_VGA) {
strptr = (char *)xf86GetOptValString(pSiS->Options, OPTION_CHTVTYPE);
......
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_vb.c,v 1.31 2003/11/19 00:49:06 twini Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_vb.c,v 1.32 2003/11/23 19:44:26 twini Exp $ */
/*
* Video bridge detection and configuration for 300, 315 and 330 series
*
......@@ -388,16 +388,16 @@ void SISTVPreInit(ScrnInfoPtr pScrn)
pSiS->VBFlags |= TV_SVIDEO;
else if(CR32 & 0x01)
pSiS->VBFlags |= TV_AVIDEO;
else if(CR32 & 0x40)
else if((CR32 & 0x40) && (!(pSiS->VBFlags & (VB_301C | VB_301LV | VB_302LV | VB_302ELV))))
pSiS->VBFlags |= (TV_SVIDEO | TV_HIVISION);
else if((CR38 & 0x04) && (pSiS->VBFlags & (VB_301C | VB_301LV | VB_302LV | VB_302ELV)))
pSiS->VBFlags |= TV_HIVISION_LV;
else if((CR38 & 0x04) && (pSiS->VBFlags & VB_CHRONTEL))
pSiS->VBFlags |= TV_YPBPR;
else if((CR38 & 0x04) && (pSiS->VBFlags & VB_CHRONTEL))
pSiS->VBFlags |= (TV_CHSCART | TV_PAL);
else if((CR38 & 0x08) && (pSiS->VBFlags & VB_CHRONTEL))
pSiS->VBFlags |= (TV_CHHDTV | TV_NTSC);
if(pSiS->VBFlags & (TV_SCART | TV_SVIDEO | TV_AVIDEO | TV_HIVISION | TV_HIVISION_LV)) {
if(pSiS->VBFlags & (TV_SCART | TV_SVIDEO | TV_AVIDEO | TV_HIVISION | TV_YPBPR)) {
if(pSiS->VGAEngine == SIS_300_VGA) {
/* TW: Should be SR38, but this does not work. */
if(SR16 & 0x20)
......@@ -443,7 +443,7 @@ void SISTVPreInit(ScrnInfoPtr pScrn)
}
}
if(pSiS->VBFlags & (TV_SCART | TV_SVIDEO | TV_AVIDEO | TV_HIVISION | TV_HIVISION_LV | TV_CHSCART | TV_CHHDTV)) {
if(pSiS->VBFlags & (TV_SCART | TV_SVIDEO | TV_AVIDEO | TV_HIVISION | TV_YPBPR | TV_CHSCART | TV_CHHDTV)) {
xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
"%sTV standard %s\n",
(pSiS->VBFlags & (TV_CHSCART | TV_CHHDTV)) ? "Using " : "Detected default ",
......
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_vga.c,v 1.38 2003/11/19 00:49:06 twini Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_vga.c,v 1.39 2003/11/24 19:08:53 twini Exp $ */
/*
* Mode setup and basic video bridge detection
*
......@@ -1337,9 +1337,10 @@ void SISVGAPreInit(ScrnInfoPtr pScrn)
int upperlimitch, lowerlimitch;
int chronteltype, chrontelidreg, upperlimitvb;
unsigned char test[3];
static const char *detectvb = "Detected %s video bridge (ID %d; Revision 0x%x)\n";
#if 0
unsigned char sr17=0;
#endif
#endif
static const char *ChrontelTypeStr[] = {
"7004",
"7005",
......@@ -1396,43 +1397,31 @@ void SISVGAPreInit(ScrnInfoPtr pScrn)
if(temp2 == 0xff) {
pSiS->VBFlags |= VB_302LV;
pSiS->sishw_ext.ujVBChipID = VB_CHIP_302LV;
xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
"Detected SiS302LV video bridge (ID 1; Revision 0x%x)\n",
temp1);
xf86DrvMsg(pScrn->scrnIndex, X_PROBED, detectvb, "SiS302LV", 1, temp1);
} else {