diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2011-08-31 21:45:58 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-06 11:42:07 -0700 |
commit | 83f76a9d7e055beb90e14f5986c06e24f60a131e (patch) | |
tree | 6f5750900c466d0f142f47c2d2c54804ead1f55b /drivers/staging | |
parent | 4c14bfd41dea0d8d40012d4113af4815ff7c4661 (diff) |
staging: xgifb: delete support for Chrontel 7007 TV output
IF_DEF_CH7007 is hard-coded to 0, so this is all just dead code that
can be deleted.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/xgifb/vb_def.h | 12 | ||||
-rw-r--r-- | drivers/staging/xgifb/vb_init.c | 9 | ||||
-rw-r--r-- | drivers/staging/xgifb/vb_setmode.c | 181 | ||||
-rw-r--r-- | drivers/staging/xgifb/vb_struct.h | 9 | ||||
-rw-r--r-- | drivers/staging/xgifb/vb_table.h | 59 |
5 files changed, 5 insertions, 265 deletions
diff --git a/drivers/staging/xgifb/vb_def.h b/drivers/staging/xgifb/vb_def.h index 78b826855ca7..fab44146de0c 100644 --- a/drivers/staging/xgifb/vb_def.h +++ b/drivers/staging/xgifb/vb_def.h @@ -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 @@ -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 diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c index 493b53220397..262992ee70e5 100644 --- a/drivers/staging/xgifb/vb_init.c +++ b/drivers/staging/xgifb/vb_init.c @@ -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"); diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c index 853b67855455..b4b5ea26c6a9 100644 --- a/drivers/staging/xgifb/vb_setmode.c +++ b/drivers/staging/xgifb/vb_setmode.c @@ -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; @@ -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; @@ -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)) { @@ -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]); - - } } } @@ -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 */ @@ -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; @@ -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)) { @@ -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); @@ -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); @@ -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 @@ -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)) { @@ -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; @@ -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)) { @@ -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 */ @@ -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; @@ -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); diff --git a/drivers/staging/xgifb/vb_struct.h b/drivers/staging/xgifb/vb_struct.h index 9428d06677a2..ee4f5b376b5d 100644 --- a/drivers/staging/xgifb/vb_struct.h +++ b/drivers/staging/xgifb/vb_struct.h @@ -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; }; @@ -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*/ diff --git a/drivers/staging/xgifb/vb_table.h b/drivers/staging/xgifb/vb_table.h index 0184292fc7eb..c97b85c573e2 100644 --- a/drivers/staging/xgifb/vb_table.h +++ b/drivers/staging/xgifb/vb_table.h @@ -2629,15 +2629,6 @@ static struct XGI330_TVDataTablStruct XGI_TVDataTable[] = { {0xffff, 0x0000, 12} /* END */ }; -/* Chrontel 7017 TV CRT1 Timing List */ -static struct XGI330_TVDataTablStruct XGI_EPLCHTVCRT1Ptr[] = { - {0x0011, 0x0000, 0}, /* XGI_CHTVCRT1UNTSC */ - {0x0011, 0x0010, 1}, /* XGI_CHTVCRT1ONTSC */ - {0x0011, 0x0001, 2}, /* XGI_CHTVCRT1UPAL */ - {0x0011, 0x0011, 3}, /* XGI_CHTVCRT1OPAL */ - {0xFFFF, 0x0000, 4} -}; - /* ;;Chrontel 7017 TV Timing List */ static struct XGI330_TVDataTablStruct XGI_EPLCHTVDataPtr[] = { {0x0011, 0x0000, 0}, /* XGI_CHTVUNTSCData */ @@ -3009,56 +3000,6 @@ static unsigned char XGI330_CHTVVCLKUPAL[] = {0x00}; static unsigned char XGI330_CHTVVCLKOPAL[] = {0x00}; -static unsigned char XGI7007_CHTVVCLKUNTSC[] = { - CH7007TVVCLK30_2, - CH7007TVVCLK30_2, - CH7007TVVCLK30_2, - CH7007TVVCLK30_2, - CH7007TVVCLK28_1, - CH7007TVVCLK47_8 -}; - -static unsigned char XGI7007_CHTVVCLKONTSC[] = { - CH7007TVVCLK26_4, - CH7007TVVCLK26_4, - CH7007TVVCLK26_4, - CH7007TVVCLK26_4, - CH7007TVVCLK24_6, - CH7007TVVCLK43_6 -}; - -static unsigned char XGI7007_CHTVVCLKUPAL[] = { - CH7007TVVCLK31_5, - CH7007TVVCLK31_5, - CH7007TVVCLK31_5, - CH7007TVVCLK31_5, - CH7007TVVCLK26_2, - CH7007TVVCLK39 -}; - -static unsigned char XGI7007_CHTVVCLKOPAL[] = { - CH7007TVVCLK31_5, - CH7007TVVCLK31_5, - CH7007TVVCLK31_5, - CH7007TVVCLK31_5, - CH7007TVVCLK26_2, - CH7007TVVCLK36 -}; - -static struct XGI330_VCLKDataStruct XGI_CH7007VCLKData[] = { - {0x60, 0x36, 30}, /* 0 30.2 MHZ */ - {0x40, 0x4A, 28}, /* 1 28.19 MHZ */ - {0x9F, 0x46, 44}, /* 2 43.6 MHZ */ - {0x97, 0x2C, 26}, /* 3 26.4 MHZ */ - {0x44, 0xE4, 25}, /* 4 24.6 MHZ */ - {0x7E, 0x32, 47}, /* 5 47.832 MHZ */ - {0x8A, 0x24, 31}, /* 6 31.5 MHZ */ - {0x97, 0x2C, 26}, /* 7 26.2 MHZ */ - {0xCE, 0x3C, 39}, /* 8 39 MHZ */ - {0x52, 0x4A, 36}, /* 9 36 MHZ */ - {0xFF, 0x00, 0} /* End mark */ -}; - static struct XGI330_VCLKDataStruct XGI_VCLKData[] = { /* SR2B,SR2C,SR2D */ {0x1B, 0xE1, 25}, /* 00 (25.175MHz) */ |