Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268104
b: refs/heads/master
c: 83f76a9
h: refs/heads/master
v: v3
  • Loading branch information
Aaro Koskinen authored and Greg Kroah-Hartman committed Sep 6, 2011
1 parent d8c4a11 commit 03f539a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 266 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4c14bfd41dea0d8d40012d4113af4815ff7c4661
refs/heads/master: 83f76a9d7e055beb90e14f5986c06e24f60a131e
12 changes: 0 additions & 12 deletions trunk/drivers/staging/xgifb/vb_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
#define VB_XGI301LV 0x0008
#define VB_XGI302LV 0x0010
#define VB_LVDS_NS 0x0001 /* 3rd party chip */
#define VB_CH7007 0x0080 /* [Billy] 07/05/03 */

#define ModeInfoFlag 0x0007
#define ModeText 0x0000
Expand Down Expand Up @@ -346,17 +345,6 @@
#define VCLK80_350 0x4B
#define VCLK107_385 0x4C

#define CH7007TVVCLK30_2 0x00 /* [Billy] 2007/05/18 For CH7007 */
#define CH7007TVVCLK28_1 0x01
#define CH7007TVVCLK43_6 0x02
#define CH7007TVVCLK26_4 0x03
#define CH7007TVVCLK24_6 0x04
#define CH7007TVVCLK47_8 0x05
#define CH7007TVVCLK31_5 0x06
#define CH7007TVVCLK26_2 0x07
#define CH7007TVVCLK39 0x08
#define CH7007TVVCLK36 0x09

#define RES320x200 0x00
#define RES320x240 0x01
#define RES400x300 0x02
Expand Down
9 changes: 0 additions & 9 deletions trunk/drivers/staging/xgifb/vb_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1732,15 +1732,6 @@ unsigned char XGIInitNew(struct xgi_hw_device_info *HwDeviceExtension)

printk("183");
/* XGINew_DetectMonitor(HwDeviceExtension); */
pVBInfo->IF_DEF_CH7007 = 0;
if ((HwDeviceExtension->jChipType == XG21) &&
(pVBInfo->IF_DEF_CH7007)) {
printk("184");
/* sense CRT2 */
XGI_GetSenseStatus(HwDeviceExtension, pVBInfo);
printk("185");

}
if (HwDeviceExtension->jChipType == XG21) {
printk("186");

Expand Down
181 changes: 5 additions & 176 deletions trunk/drivers/staging/xgifb/vb_setmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2456,15 +2456,9 @@ static void *XGI_GetTVPtr(unsigned short BX, unsigned short ModeNo,
switch (tempbx) {
case 0:
tempdi = NULL; /*EPLCHTVCRT1Ptr_H;*/
if (pVBInfo->IF_DEF_CH7007 == 1)
tempdi = XGI_EPLCHTVCRT1Ptr;

break;
case 1:
tempdi = NULL; /*EPLCHTVCRT1Ptr_V;*/
if (pVBInfo->IF_DEF_CH7007 == 1)
tempdi = XGI_EPLCHTVCRT1Ptr;

break;
case 2:
tempdi = XGI_EPLCHTVDataPtr;
Expand Down Expand Up @@ -2626,9 +2620,6 @@ static void XGI_ModCRT1Regs(unsigned short ModeNo, unsigned short ModeIdIndex,
unsigned short tempbx, i;
struct XGI_LVDSCRT1HDataStruct *LCDPtr = NULL;
struct XGI_LVDSCRT1VDataStruct *LCDPtr1 = NULL;
/* struct XGI330_CHTVDataStruct *TVPtr = NULL; */
struct XGI_CH7007TV_TimingHStruct *CH7007TV_TimingHPtr = NULL;
struct XGI_CH7007TV_TimingVStruct *CH7007TV_TimingVPtr = NULL;

if (ModeNo <= 0x13)
index = pVBInfo->SModeIDTable[ModeIdIndex].St_CRT2CRTC;
Expand All @@ -2653,32 +2644,8 @@ static void XGI_ModCRT1Regs(unsigned short ModeNo, unsigned short ModeIdIndex,
pVBInfo->TimingH[0].data[i] = LCDPtr[0].Reg[i];
}

if (pVBInfo->IF_DEF_CH7007 == 1) {
if (pVBInfo->VBInfo & SetCRT2ToTV) {
CH7007TV_TimingHPtr =
(struct XGI_CH7007TV_TimingHStruct *)
XGI_GetTVPtr(
tempbx,
ModeNo,
ModeIdIndex,
RefreshRateTableIndex,
pVBInfo);

for (i = 0; i < 8; i++)
pVBInfo->TimingH[0].data[i] =
CH7007TV_TimingHPtr[0].data[i];
}
}

XGI_SetCRT1Timing_H(pVBInfo, HwDeviceExtension);

if (pVBInfo->IF_DEF_CH7007 == 1) {
xgifb_reg_set(pVBInfo->P3c4, 0x2E,
CH7007TV_TimingHPtr[0].data[8]);
xgifb_reg_set(pVBInfo->P3c4, 0x2F,
CH7007TV_TimingHPtr[0].data[9]);
}

tempbx = 1;

if (pVBInfo->VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) {
Expand All @@ -2693,34 +2660,7 @@ static void XGI_ModCRT1Regs(unsigned short ModeNo, unsigned short ModeIdIndex,
pVBInfo->TimingV[0].data[i] = LCDPtr1[0].Reg[i];
}

if (pVBInfo->IF_DEF_CH7007 == 1) {
if (pVBInfo->VBInfo & SetCRT2ToTV) {
CH7007TV_TimingVPtr =
(struct XGI_CH7007TV_TimingVStruct *)
XGI_GetTVPtr(
tempbx,
ModeNo,
ModeIdIndex,
RefreshRateTableIndex,
pVBInfo);

for (i = 0; i < 7; i++)
pVBInfo->TimingV[0].data[i] =
CH7007TV_TimingVPtr[0].data[i];
}
}

XGI_SetCRT1Timing_V(ModeIdIndex, ModeNo, pVBInfo);

if (pVBInfo->IF_DEF_CH7007 == 1) {
xgifb_reg_and_or(pVBInfo->P3c4, 0x33, ~0x01,
CH7007TV_TimingVPtr[0].data[7] & 0x01);
xgifb_reg_set(pVBInfo->P3c4, 0x34,
CH7007TV_TimingVPtr[0].data[8]);
xgifb_reg_set(pVBInfo->P3c4, 0x3F,
CH7007TV_TimingVPtr[0].data[9]);

}
}
}

Expand Down Expand Up @@ -3127,9 +3067,7 @@ static unsigned char XGI_GetVCLKPtr(unsigned short RefreshRateTableIndex,
{

unsigned short index, modeflag;
unsigned short tempbx;
unsigned char tempal;
unsigned char *CHTVVCLKPtr = NULL;

if (ModeNo <= 0x13)
/* si+St_ResInfo */
Expand Down Expand Up @@ -3189,77 +3127,6 @@ static unsigned char XGI_GetVCLKPtr(unsigned short RefreshRateTableIndex,
}
} /* {End of VB} */

if ((pVBInfo->IF_DEF_CH7007 == 1) &&
(pVBInfo->VBType & VB_CH7007)) { /* [Billy] 07/05/08 CH7007 */
/* VideoDebugPrint((
0,
"XGI_GetVCLKPtr: pVBInfo->IF_DEF_CH7007==1\n")); */
if ((pVBInfo->VBInfo & SetCRT2ToTV)) {
if (ModeNo <= 0x13) {
tempal = pVBInfo->SModeIDTable[ModeIdIndex].
St_CRT2CRTC;
} else {
tempal = pVBInfo->RefIndex[
RefreshRateTableIndex].Ext_CRT2CRTC;
}

tempal = tempal & 0x0F;
tempbx = 0;

if (pVBInfo->TVInfo & SetPALTV)
tempbx = tempbx + 2;

if (pVBInfo->TVInfo & SetCHTVOverScan)
tempbx++;

/** tempbx = tempbx << 1; CH7007 ? **/

/* [Billy]07/05/29 CH7007 */
if (pVBInfo->IF_DEF_CH7007 == 1) {
switch (tempbx) {
case 0:
CHTVVCLKPtr = XGI7007_CHTVVCLKUNTSC;
break;
case 1:
CHTVVCLKPtr = XGI7007_CHTVVCLKONTSC;
break;
case 2:
CHTVVCLKPtr = XGI7007_CHTVVCLKUPAL;
break;
case 3:
CHTVVCLKPtr = XGI7007_CHTVVCLKOPAL;
break;
default:
break;

}
}
/* else {
switch(tempbx) {
case 0:
CHTVVCLKPtr = pVBInfo->CHTVVCLKUNTSC;
break;
case 1:
CHTVVCLKPtr = pVBInfo->CHTVVCLKONTSC;
break;
case 2:
CHTVVCLKPtr = pVBInfo->CHTVVCLKUPAL;
break;
case 3:
CHTVVCLKPtr = pVBInfo->CHTVVCLKOPAL;
break;
default:
break;
}
}
*/

tempal = CHTVVCLKPtr[tempal];
return tempal;
}

}

tempal = (unsigned char) inb((pVBInfo->P3ca + 0x02));
tempal = tempal >> 2;
tempal &= 0x03;
Expand All @@ -3278,13 +3145,7 @@ static unsigned char XGI_GetVCLKPtr(unsigned short RefreshRateTableIndex,
static void XGI_GetVCLKLen(unsigned char tempal, unsigned char *di_0,
unsigned char *di_1, struct vb_device_info *pVBInfo)
{
if (pVBInfo->IF_DEF_CH7007 == 1) { /* [Billy] 2007/05/16 */
/* VideoDebugPrint((
0,
"XGI_GetVCLKLen: pVBInfo->IF_DEF_CH7007==1\n")); */
*di_0 = (unsigned char) XGI_CH7007VCLKData[tempal].SR2B;
*di_1 = (unsigned char) XGI_CH7007VCLKData[tempal].SR2C;
} else if (pVBInfo->VBType & (VB_XGI301 | VB_XGI301B | VB_XGI302B
if (pVBInfo->VBType & (VB_XGI301 | VB_XGI301B | VB_XGI302B
| VB_XGI301LV | VB_XGI302LV | VB_XGI301C)) {
if ((!(pVBInfo->VBInfo & SetCRT2ToLCDA)) && (pVBInfo->SetFlag
& ProgrammingCRT2)) {
Expand Down Expand Up @@ -3312,10 +3173,7 @@ static void XGI_SetCRT2ECLK(unsigned short ModeNo, unsigned short ModeIdIndex,
for (i = 0; i < 4; i++) {
xgifb_reg_and_or(pVBInfo->P3d4, 0x31, ~0x30,
(unsigned short) (0x10 * i));
if (pVBInfo->IF_DEF_CH7007 == 1) {
xgifb_reg_set(pVBInfo->P3c4, 0x2b, di_0);
xgifb_reg_set(pVBInfo->P3c4, 0x2c, di_1);
} else if ((!(pVBInfo->VBInfo & SetCRT2ToLCDA))
if ((!(pVBInfo->VBInfo & SetCRT2ToLCDA))
&& (!(pVBInfo->VBInfo & SetInSlaveMode))) {
xgifb_reg_set(pVBInfo->P3c4, 0x2e, di_0);
xgifb_reg_set(pVBInfo->P3c4, 0x2f, di_1);
Expand Down Expand Up @@ -3430,10 +3288,6 @@ void XGI_GetVBType(struct vb_device_info *pVBInfo)
{
unsigned short flag, tempbx, tempah;

if (pVBInfo->IF_DEF_CH7007 == 1) {
pVBInfo->VBType = VB_CH7007;
return;
}
if (pVBInfo->IF_DEF_LVDS == 0) {
tempbx = VB_XGI302B;
flag = xgifb_reg_get(pVBInfo->Part4Port, 0x00);
Expand Down Expand Up @@ -3536,9 +3390,7 @@ void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
if (((pVBInfo->IF_DEF_LVDS == 0) &&
((pVBInfo->VBType & VB_XGI301LV) ||
(pVBInfo->VBType & VB_XGI302LV) ||
(pVBInfo->VBType & VB_XGI301C))) ||
((pVBInfo->IF_DEF_CH7007 == 1) &&
(pVBInfo->VBType & VB_CH7007))) {
(pVBInfo->VBType & VB_XGI301C)))) {
if (temp & SetYPbPr) { /* temp = CR38 */
if (pVBInfo->IF_DEF_HiVision == 1) {
/* shampoo add for new
Expand Down Expand Up @@ -3577,11 +3429,7 @@ void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
temp = 0x017C;
}
} else { /* 3nd party chip */
/* [Billy] 07/05/03 */
if (pVBInfo->IF_DEF_CH7007 == 1)
temp = SetCRT2ToTV;
else
temp = SetCRT2ToLCD;
temp = SetCRT2ToLCD;
}

if (!(tempbx & temp)) {
Expand Down Expand Up @@ -3763,13 +3611,6 @@ void XGI_GetTVInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
*/
}

if (pVBInfo->IF_DEF_CH7007 == 1) { /* [Billy] 07/05/04 */
tempbx = xgifb_reg_get(pVBInfo->P3d4, 0x35);

if (tempbx & TVOverScan)
tempbx |= SetCHTVOverScan;
}

if (pVBInfo->IF_DEF_LVDS == 0) {
if (pVBInfo->VBInfo & SetCRT2ToSCART)
tempbx |= SetPALTV;
Expand Down Expand Up @@ -4216,10 +4057,6 @@ void XGI_DisplayOn(struct xgi_hw_device_info *pXGIHWDE,

}

/* [Billy] 07/05/23 For CH7007 */
if (pVBInfo->IF_DEF_CH7007 == 1) {
}

if (pXGIHWDE->jChipType == XG27) {
if (pVBInfo->IF_DEF_LVDS == 1) {
if (!(XGI_XG27GetPSCValue(pVBInfo) & 0x1)) {
Expand Down Expand Up @@ -4256,12 +4093,6 @@ void XGI_DisplayOff(struct xgi_hw_device_info *pXGIHWDE,
}
}

if (pVBInfo->IF_DEF_CH7007 == 1) { /* [Billy] 07/05/23 For CH7007 */
/* if (IsCH7007TVMode(pVBInfo) == 0) */
{
}
}

if (pXGIHWDE->jChipType == XG27) {
if ((XGI_XG27GetPSCValue(pVBInfo) & 0x2)) {
/* LVDS backlight off */
Expand Down Expand Up @@ -8495,7 +8326,6 @@ unsigned char XGISetModeNew(struct xgi_hw_device_info *HwDeviceExtension,
pVBInfo->BaseAddr = (unsigned long) HwDeviceExtension->pjIOAddress;
pVBInfo->IF_DEF_LVDS = 0;
pVBInfo->IF_DEF_LCDA = 1;
pVBInfo->IF_DEF_CH7007 = 0; /* [Billy] 2007/05/14 */
pVBInfo->IF_DEF_VideoCapture = 0;
pVBInfo->IF_DEF_ScaleLCD = 0;
pVBInfo->IF_DEF_OEMUtil = 0;
Expand Down Expand Up @@ -8628,8 +8458,7 @@ unsigned char XGISetModeNew(struct xgi_hw_device_info *HwDeviceExtension,
}

pVBInfo->SetFlag = 0;
if (pVBInfo->IF_DEF_CH7007 != 1)
pVBInfo->VBInfo = DisableCRT2Display;
pVBInfo->VBInfo = DisableCRT2Display;

XGI_DisplayOff(HwDeviceExtension, pVBInfo);

Expand Down
9 changes: 0 additions & 9 deletions trunk/drivers/staging/xgifb/vb_struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,6 @@ struct XGI_TimingVStruct {
unsigned char data[7];
};

struct XGI_CH7007TV_TimingHStruct {
unsigned char data[10];
};

struct XGI_CH7007TV_TimingVStruct {
unsigned char data[10];
};

struct XGI_XG21CRT1Struct {
unsigned char ModeID, CR02, CR03, CR15, CR16;
};
Expand Down Expand Up @@ -301,7 +293,6 @@ struct vb_device_info {
IF_DEF_ScaleLCD, IF_DEF_OEMUtil, IF_DEF_PWD;
unsigned short IF_DEF_ExpLink;
unsigned short IF_DEF_HiVision;
unsigned short IF_DEF_CH7007; /* Billy 2007/05/03 */
unsigned short LCDResInfo, LCDTypeInfo, VBType;/*301b*/
unsigned short VBInfo, TVInfo, LCDInfo, Set_VGAType;
unsigned short VBExtInfo;/*301lv*/
Expand Down
Loading

0 comments on commit 03f539a

Please sign in to comment.