XFree86 4.3.99.902 (RC 2)

parent ebde9d17
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/init.c,v 1.39 2003/12/02 16:44:36 twini Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/init.c,v 1.40 2003/12/03 23:07:47 twini Exp $ */
/*
* Mode initializing code (CRT1 section) for
* for SiS 300/305/540/630/730 and
......@@ -887,7 +887,7 @@ SiS_GetModeID_LCD(int VGAEngine, ULONG VBFlags, int HDisplay, int VDisplay,
if(VDisplay == 1200) ModeIndex = ModeIndex_1600x1200[Depth];
}
break;
}
}
} else if(VBFlags & VB_SISBRIDGE) {
......
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/init.h,v 1.37 2003/12/02 12:15:30 twini Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/init.h,v 1.38 2003/12/16 17:59:08 twini Exp $ */
/*
* Data and prototypes for init.c
*
......
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/init301.c,v 1.58 2003/12/02 16:44:37 twini Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/init301.c,v 1.59 2003/12/16 17:35:05 twini Exp $ */
/*
* Mode initializing code (CRT2 section)
* for SiS 300/305/540/630/730 and
......@@ -45,8 +45,9 @@
#define SET_EMI /* 302LV/ELV: Set EMI values */
#endif
#define COMPAL_HACK /* Needed for compal 1400x1050 (EMI) */
#define COMPAL_HACK /* Needed for Compal 1400x1050 (EMI) */
#define COMPAQ_HACK /* Needed for Inventec/Compaq 1280x1024 (EMI) */
#define ASUS_HACK /* Needed for Asus A2H 1024x768 (EMI) */
#include "init301.h"
......@@ -261,6 +262,8 @@ SiS_AdjustCRT2Rate(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
if(SiS_Pr->SiS_VBType & VB_SIS301B302B) {
if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) {
if(tempbx == 0x2e) { /* 640x480 */
tempax |= Support64048060Hz;
#if 0 /* DDC info not relyable (eg Sony) */
if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1280x768) {
tempax |= Support64048060Hz;
} else if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_PanelCustom) {
......@@ -268,6 +271,7 @@ SiS_AdjustCRT2Rate(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
tempax |= Support64048060Hz;
}
}
#endif
}
}
}
......@@ -483,10 +487,10 @@ SiS_CR36BIOSWord23d(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
void
SiS_DDC2Delay(SiS_Private *SiS_Pr, USHORT delaytime)
{
USHORT i;
USHORT i, j;
for(i=0; i<delaytime; i++) {
SiS_GetReg(SiS_Pr->SiS_P3c4,0x05);
j += SiS_GetReg(SiS_Pr->SiS_P3c4,0x05);
}
}
......@@ -612,7 +616,11 @@ SiS_PanelDelay(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo, USHORT DelayTime)
} else {
Delay = SiS_Pr->SiS_PanelDelayTbl[DelayIndex].timer[1];
}
SiS_DDC2Delay(SiS_Pr, Delay << 2);
Delay <<= 2;
if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
Delay <<= 5;
}
SiS_DDC2Delay(SiS_Pr, Delay);
}
......@@ -2211,8 +2219,8 @@ SiS_SetCRT2ModeRegs(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
/* The following two are responsible for eventually wrong colors
* in TV output. The DH (VB_NoLCD) conditions are unknown; the
* b0 was found in some 651 machine (Pim); the b1 version in a
* 650 box (Jake). What is the criteria?
* b0 was found in some 651 machine (Pim; P4_23=0xe5); the b1 version
* in a 650 box (Jake). What is the criteria?
*/
if((IS_SIS740) || (HwInfo->jChipType >= SIS_661)) {
......@@ -3344,6 +3352,12 @@ SiS_GetLVDSDesPtrA(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,
if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx++;
}
}
if(SiS_Pr->SiS_CustomT == CUT_ASUSA2H_2) {
if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
tempbx = 86;
if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx++;
}
}
if(ModeNo <= 0x13)
tempal = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC;
......@@ -3393,6 +3407,8 @@ SiS_GetLVDSDesData(SiS_Private *SiS_Pr, USHORT ModeNo,USHORT ModeIdIndex,
case 83: PanelDesPtr = (SiS_LVDSDesStruct *)Uniwill1024x768Des_2; break;
case 84: PanelDesPtr = (SiS_LVDSDesStruct *)Compaq1280x1024Des_1; break;
case 85: PanelDesPtr = (SiS_LVDSDesStruct *)Compaq1280x1024Des_2; break;
case 86: PanelDesPtr = (SiS_LVDSDesStruct *)Asus1024x768Des_1; break; /* custom */
case 87: PanelDesPtr = (SiS_LVDSDesStruct *)Asus1024x768Des_2; break;
default: PanelDesPtr = SiS_Pr->LVDS1024x768Des_1; break;
}
#endif
......@@ -3736,7 +3752,7 @@ SiS_DisableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
if( (SiS_IsVAMode(SiS_Pr, HwInfo)) ||
(SiS_CRT2IsLCD(SiS_Pr, HwInfo)) ) {
SiS_PanelDelayLoop(SiS_Pr, HwInfo, 3, 10);
SiS_PanelDelayLoop(SiS_Pr, HwInfo, 3, 20);
}
}
......@@ -4174,6 +4190,9 @@ SiS_EnableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
(SiS_Pr->SiS_CustomT != CUT_CLEVO1400)) {
SiS_PanelDelayLoop(SiS_Pr, HwInfo, 3, 2);
SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x26,0x02);
if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
SiS_GenericDelay(SiS_Pr, 0x4500);
}
SiS_PanelDelayLoop(SiS_Pr, HwInfo, 3, 2);
} else {
SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x26,0x02);
......@@ -4303,6 +4322,7 @@ SiS_EnableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
/* Clevo 1024x768: 0x0d, 0x70, 0x40 (if type == 3) YES (1.10.8y; CR36=?2) */
/* Clevo 1024x768: 0x05, 0x60, 0x33 (if type != 3) YES (1.10.8y; CR36=?2) */
/* Asus 1024x768: ? ? (1.10.8o; CR36=?2) */
/* Asus 1024x768: 0x08, 0x10, 0x3c (problematic) YES (1.10.8q; CR36=22) */
if(SiS_Pr->HaveEMI) {
r30 = SiS_Pr->EMI_30;
......@@ -4362,37 +4382,56 @@ SiS_EnableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
}
}
#ifdef COMPAL_HACK /* BIOS values don't work so well */
/* BIOS values don't work so well sometimes */
if(!SiS_Pr->OverruleEMI) {
#ifdef COMPAL_HACK
if(SiS_Pr->SiS_CustomT == CUT_COMPAL1400_2) {
if((cr36 & 0x0f) == 0x09) {
r30 = 0x60; r31 = 0x05; r32 = 0x60; r33 = 0x00;
}
}
}
#endif
#ifdef COMPAQ_HACK
if(!SiS_Pr->OverruleEMI) {
if(SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) {
if((cr36 & 0x0f) == 0x03) {
r30 = 0x20; r31 = 0x12; r32 = 0xd0; r33 = 0x6b; /* rev 1 */
/* r30 = 0x60; r31 = 0x12; r32 = 0xd0; r33 = 0x6b; */ /* rev 2 */
/* r30 = 0x20; r31 = 0x05; r32 = 0x60; r33 = 0x00; */ /* rev 3 */
/* r30 = 0x60; r31 = 0x05; r32 = 0x60; r33 = 0x00; */ /* rev 4 */
r30 = 0x20; r31 = 0x12; r32 = 0xd0; r33 = 0x6b; /* rev 1 */
}
}
#endif
#ifdef ASUS_HACK
if(SiS_Pr->SiS_CustomT == CUT_ASUSA2H_2) {
if((cr36 & 0x0f) == 0x02) {
/* r30 = 0x60; r31 = 0x05; r32 = 0x60; r33 = 0x33; */ /* rev 2 */
/* r30 = 0x20; r31 = 0x05; r32 = 0x60; r33 = 0x33; */ /* rev 3 */
/* r30 = 0x60; r31 = 0x0d; r32 = 0x70; r33 = 0x40; */ /* rev 4 */
/* r30 = 0x20; r31 = 0x0d; r32 = 0x70; r33 = 0x40; */ /* rev 5 */
}
}
}
#endif
SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x30,0x20);
}
if(!(SiS_Pr->OverruleEMI && (!r30) && (!r31) && (!r32) && (!r33))) {
SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x30,0x20);
}
SiS_SetReg(SiS_Pr->SiS_Part4Port,0x31,r31);
SiS_SetReg(SiS_Pr->SiS_Part4Port,0x32,r32);
SiS_SetReg(SiS_Pr->SiS_Part4Port,0x33,r33);
SiS_SetReg(SiS_Pr->SiS_Part4Port,0x34,0x10);
if(!(SiS_Pr->OverruleEMI && (!r30) && (!r31) && (!r32) && (!r33))) {
SiS_SetReg(SiS_Pr->SiS_Part4Port,0x34,0x10);
} else {
SiS_SetReg(SiS_Pr->SiS_Part4Port,0x34,0x00);
}
if( (SiS_IsVAMode(SiS_Pr,HwInfo)) ||
(SiS_CRT2IsLCD(SiS_Pr, HwInfo)) ) {
if(r30 & 0x40) {
SiS_PanelDelayLoop(SiS_Pr, HwInfo, 3, 5);
SiS_WaitVBRetrace(SiS_Pr,HwInfo);
if(delaylong) {
SiS_PanelDelayLoop(SiS_Pr, HwInfo, 3, 5);
delaylong = FALSE;
}
SiS_WaitVBRetrace(SiS_Pr,HwInfo);
if(SiS_Pr->SiS_CustomT == CUT_ASUSA2H_2) {
SiS_GenericDelay(SiS_Pr, 0x500);
}
SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x30,0x40);
}
}
......@@ -4436,6 +4475,9 @@ SiS_EnableBridge(SiS_Private *SiS_Pr, PSIS_HW_INFO HwInfo)
SiS_PanelDelayLoop(SiS_Pr, HwInfo, 3, 10);
}
SiS_WaitVBRetrace(SiS_Pr,HwInfo);
if(SiS_Pr->SiS_VBType & (VB_SIS302LV | VB_SIS302ELV)) {
SiS_GenericDelay(SiS_Pr, 0x500);
}
SiS_SetRegOR(SiS_Pr->SiS_Part4Port,0x26,0x01);
}
}
......@@ -6977,6 +7019,10 @@ SiS_GetCRT2Part2Ptr(SiS_Private *SiS_Pr,USHORT ModeNo,USHORT ModeIdIndex,
else if(SiS_Pr->SiS_SetFlag & LCDVESATiming) tempbx = 105;
}
}
} else if(SiS_Pr->SiS_CustomT == CUT_ASUSA2H_2) {
if(SiS_Pr->SiS_LCDResInfo == SiS_Pr->SiS_Panel1024x768) {
if(SiS_Pr->SiS_SetFlag & LCDVESATiming) tempbx = 106;
}
}
*CRT2Index = tempbx;
......@@ -7747,6 +7793,7 @@ SiS_SetGroup2(SiS_Private *SiS_Pr, USHORT ModeNo, USHORT ModeIdIndex,USHORT Refr
case 103: CRT2Part2Ptr = (SiS_Part2PortTblStruct *)SiS310_CRT2Part2_Clevo1024x768_1; break; /* Custom */
case 104: CRT2Part2Ptr = (SiS_Part2PortTblStruct *)SiS310_CRT2Part2_Clevo1024x768_2; break;
case 105: CRT2Part2Ptr = (SiS_Part2PortTblStruct *)SiS310_CRT2Part2_Clevo1024x768_3; break;
case 106: CRT2Part2Ptr = (SiS_Part2PortTblStruct *)SiS310_CRT2Part2_Asus1024x768_3; break;
default: CRT2Part2Ptr = SiS_Pr->SiS_CRT2Part2_1024x768_3; break;
}
......
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/init301.h,v 1.35 2003/12/02 12:15:32 twini Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/init301.h,v 1.36 2003/12/16 17:59:08 twini Exp $ */
/*
* Data and prototypes for init301.c
*
......
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/oem310.h,v 1.18 2003/10/30 18:53:42 twini Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/oem310.h,v 1.19 2003/12/16 17:35:06 twini Exp $ */
/*
* OEM Data for 315/330 series
*
......@@ -561,6 +561,45 @@ static const SiS_LVDSDesStruct Clevo1024x768Des_2[] =
{ 0, 0 }
};
/* Asus A2xxxH _2 */
static const SiS_Part2PortTblStruct SiS310_CRT2Part2_Asus1024x768_3[] =
{
{{0x25,0x13,0xc9,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
{{0x2c,0x13,0x9a,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
{{0x25,0x13,0xc9,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
{{0x38,0x13,0x13,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}},
{{0x38,0x13,0x16,0x25,0xff,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}},
{{0x36,0x13,0x13,0x25,0xff,0x5a,0x45,0x0a,0x07,0xfa,0x0a,0x24}},
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
{{0x25,0x13,0xc9,0x25,0xff,0x59,0x45,0x09,0x07,0xf9,0x09,0x24}}
};
static const SiS_LVDSDesStruct Asus1024x768Des_1[] =
{
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 },
{ 0, 0 }
};
static const SiS_LVDSDesStruct Asus1024x768Des_2[] =
{
{ 1184, 622 },
{ 1184, 597 },
{ 1184, 622 },
{ 1184, 597 },
{ 1152, 622 },
{ 1232, 722 },
{ 0, 0 }
};
/* CRT2 data is std */
/* Uniwill N243S9, ECS A928 */
static const SiS_LVDSDesStruct Uniwill1024x768Des_1[] =
......
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis.h,v 1.93 2003/12/02 12:15:32 twini Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis.h,v 1.99 2003/12/16 17:45:19 twini Exp $ */
/*
* Main global data and definitions
*
......@@ -24,8 +24,8 @@
*
* Authors:
*
* ?
* Thomas Winischhofer <thomas@winischhofer.net>
* ?
*
*/
#ifndef _SIS_H
......@@ -36,7 +36,7 @@
#define SISDRIVERVERSIONYEAR 3
#define SISDRIVERVERSIONMONTH 12
#define SISDRIVERVERSIONDAY 2
#define SISDRIVERVERSIONDAY 15
#define SISDRIVERREVISION 1
#define SISDRIVERIVERSION (SISDRIVERVERSIONYEAR << 16) | (SISDRIVERVERSIONMONTH << 8) \
......@@ -516,6 +516,7 @@ typedef struct {
unsigned char *RenderAccelArray;
unsigned char * FbBase1;
unsigned long OnScreenSize1;
unsigned char OldMode;
#ifdef SIS_CP
SIS_CP_H_ENT
#endif
......@@ -592,7 +593,8 @@ typedef struct {
int forceCRT1;
Bool CRT1changed;
unsigned char oldCR17, oldCR63, oldSR1F;
unsigned char oldCR32;
unsigned char oldCR32, oldCR36, oldCR37;
unsigned char myCR32, myCR36, myCR37;
unsigned char newCR32;
unsigned long VBFlags; /* Video bridge configuration */
unsigned long VBFlags_backup; /* Backup for SlaveMode-modes */
......@@ -795,7 +797,7 @@ typedef struct {
unsigned char sisfblcda;
int sisfbscalelcd;
unsigned long sisfbspecialtiming;
BOOL sisfb_haveemi;
BOOL sisfb_haveemi, sisfb_haveemilcd;
unsigned char sisfb_emi30,sisfb_emi31,sisfb_emi32,sisfb_emi33;
int EMI;
int NoYV12; /* Disable Xv YV12 support (old series) */
......@@ -1062,7 +1064,7 @@ extern void SiS_SetTVyposoffset(ScrnInfoPtr pScrn, int val);
extern void SiS_SetTVxscale(ScrnInfoPtr pScrn, int val);
extern void SiS_SetTVyscale(ScrnInfoPtr pScrn, int val);
extern Bool SISSwitchCRT2Type(ScrnInfoPtr pScrn, unsigned long newvbflags);
extern Bool SISCheckModeIndexForCRT2Type(ScrnInfoPtr pScrn, unsigned short cond,
extern int SISCheckModeIndexForCRT2Type(ScrnInfoPtr pScrn, unsigned short cond,
unsigned short index, Bool quiet);
extern Bool SISSwitchCRT1Status(ScrnInfoPtr pScrn, int onoff);
extern int SiS_GetCHTVlumabandwidthcvbs(ScrnInfoPtr pScrn);
......
This diff is collapsed.
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_driver.h,v 1.29 2003/11/29 12:08:02 twini Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_driver.h,v 1.30 2003/12/16 17:35:07 twini Exp $ */
/*
* Global data and definitions
*
......@@ -222,7 +222,14 @@ const customttable mycustomttable[] = {
{ 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0 },
0x1043, 0x1612,
"Asus", "A2H", CUT_ASUSA2H, "ASUS_A2H"
"Asus", "A2H (V1)", CUT_ASUSA2H_1, "ASUS_A2H_1"
},
{ SIS_650, "1.10.8q", "",
0, /* For EMI */
{ 0, 0, 0, 0, 0 },
{ 0, 0, 0, 0, 0 },
0x1043, 0x1612,
"Asus", "A2H (V2)", CUT_ASUSA2H_2, "ASUS_A2H_2"
},
{ 4321, "", "", /* never autodetected */
0,
......
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_opt.c,v 1.49 2003/12/02 12:15:33 twini Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_opt.c,v 1.50 2003/12/09 17:49:26 twini Exp $ */
/*
* SiS driver option evaluation
*
......@@ -339,7 +339,7 @@ SiSOptions(ScrnInfoPtr pScrn)
pSiS->enablesisctrl = FALSE;
if((pSiS->VGAEngine == SIS_300_VGA) || (pSiS->VGAEngine == SIS_315_VGA)) {
pSiS->XvDefBri = 10;
pSiS->XvDefCon = 5;
pSiS->XvDefCon = 2;
} else {
pSiS->XvDefBri = 0;
pSiS->XvDefCon = 4;
......
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_vb.c,v 1.32 2003/11/23 19:44:26 twini Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_vb.c,v 1.34 2003/12/16 17:35:07 twini Exp $ */
/*
* Video bridge detection and configuration for 300, 315 and 330 series
*
......@@ -212,6 +212,8 @@ void SISLCDPreInit(ScrnInfoPtr pScrn)
SISPtr pSiS = SISPTR(pScrn);
unsigned char CR32, CR36, CR37;
pSiS->LCDwidth = 0;
if(!(pSiS->VBFlags & VB_VIDEOBRIDGE)) return;
inSISIDXREG(SISCR, 0x32, CR32);
......@@ -355,8 +357,7 @@ void SISTVPreInit(ScrnInfoPtr pScrn)
unsigned char SR16, SR38, CR32, CR35=0, CR38=0, CR79;
int temp = 0;
if(!(pSiS->VBFlags & VB_VIDEOBRIDGE))
return;
if(!(pSiS->VBFlags & VB_VIDEOBRIDGE)) return;
inSISIDXREG(SISCR, 0x32, CR32);
inSISIDXREG(SISSR, 0x16, SR16);
......@@ -443,7 +444,7 @@ void SISTVPreInit(ScrnInfoPtr pScrn)
}
}
if(pSiS->VBFlags & (TV_SCART | TV_SVIDEO | TV_AVIDEO | TV_HIVISION | TV_YPBPR | 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 ",
......@@ -461,8 +462,7 @@ void SISCRT2PreInit(ScrnInfoPtr pScrn)
SISPtr pSiS = SISPTR(pScrn);
unsigned char CR32;
if(!(pSiS->VBFlags & VB_VIDEOBRIDGE))
return;
if(!(pSiS->VBFlags & VB_VIDEOBRIDGE)) return;
/* CRT2-VGA not supported on LVDS and 30xLV */
if(pSiS->VBFlags & (VB_LVDS|VB_301LV|VB_302LV|VB_302ELV))
......
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_video.c,v 1.41 2003/11/19 00:49:06 twini Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/sis_video.c,v 1.44 2003/12/16 17:35:07 twini Exp $ */
/*
* Xv driver for SiS 300, 315 and 330 series.
*
......@@ -1676,12 +1676,12 @@ SISSetPortAttribute(ScrnInfoPtr pScrn, Atom attribute,
}
} else if(attribute == pSiS->xv_CMD) {
if(pSiS->xv_sisdirectunlocked) {
int result = 0;
pSiS->xv_sd_result = (value & 0xffffff00);
if(SISCheckModeIndexForCRT2Type(pScrn, (unsigned short)(value & 0xff),
(unsigned short)((value >> 8) & 0xff),
FALSE)) {
pSiS->xv_sd_result |= 0x01;
}
result = SISCheckModeIndexForCRT2Type(pScrn, (unsigned short)(value & 0xff),
(unsigned short)((value >> 8) & 0xff),
FALSE);
pSiS->xv_sd_result |= (result & 0xff);
}
} else if(attribute == pSiS->xv_SGA) {
if(pSiS->xv_sisdirectunlocked) {
......@@ -2081,12 +2081,10 @@ SiSHandleSiSDirectCommand(ScrnInfoPtr pScrn, SISPortPrivPtr pPriv, sisdirectcomm
break;
case SDC_CMD_CHECKMODEFORCRT2:
j = sdcbuf->sdc_parm[0];
sdcbuf->sdc_parm[0] = 0;
if(SISCheckModeIndexForCRT2Type(pScrn, (unsigned short)(j & 0xff),
(unsigned short)((j >> 8) & 0xff),
FALSE)) {
sdcbuf->sdc_parm[0] = 1;
}
sdcbuf->sdc_parm[0] = SISCheckModeIndexForCRT2Type(pScrn,
(unsigned short)(j & 0xff),
(unsigned short)((j >> 8) & 0xff),
FALSE) & 0xff;
break;
default:
sdcbuf->sdc_header = SDC_RESULT_UNDEFCMD;
......@@ -2700,7 +2698,7 @@ set_brightness(SISPtr pSiS, CARD8 brightness)
static __inline void
set_contrast(SISPtr pSiS, CARD8 contrast)
{
setvideoregmask(pSiS, Index_VI_Contrast_Enh_Ctrl, contrast ^ 0x07, 0x07);
setvideoregmask(pSiS, Index_VI_Contrast_Enh_Ctrl, contrast, 0x07);
}
/* 315 series and later only */
......@@ -3398,6 +3396,7 @@ SISDisplayVideo(ScrnInfoPtr pScrn, SISPortPrivPtr pPriv)
pPriv->mustwait = 1;
pPriv->oldx1 = overlay.dstBox.x1; pPriv->oldx2 = overlay.dstBox.x2;
pPriv->oldy1 = overlay.dstBox.y1; pPriv->oldy2 = overlay.dstBox.y2;
}
#ifdef SISMERGED
}
......
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/vgatypes.h,v 1.17 2003/12/02 12:15:33 twini Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/vgatypes.h,v 1.18 2003/12/16 17:45:20 twini Exp $ */
/*
* General type definitions for universal mode switching modules
*
......@@ -285,8 +285,9 @@ struct _SISFB_INFO {
unsigned char sisfb_haveemi;
unsigned char sisfb_emi30,sisfb_emi31,sisfb_emi32,sisfb_emi33;
unsigned char sisfb_haveemilcd;
char reserved[214]; /* for future use */
char reserved[213]; /* for future use */
};
#endif
......
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/vstruct.h,v 1.25 2003/12/02 12:15:33 twini Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/sis/vstruct.h,v 1.26 2003/12/16 17:35:07 twini Exp $ */
/*
* General structure definitions for universal mode switching modules
*
......@@ -229,7 +229,8 @@ typedef UCHAR DRAM4Type[4];
#define CUT_ACER1280 14
#define CUT_COMPAL1400_1 15
#define CUT_COMPAL1400_2 16
#define CUT_ASUSA2H 17
#define CUT_ASUSA2H_1 17
#define CUT_ASUSA2H_2 18
typedef struct _SiS_Private
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment