Commit 45e44f8d authored by Walt Feasel's avatar Walt Feasel Committed by Greg Kroah-Hartman

staging: xgifb: vb_setmode.c Comment style modifications

Make comment style modifications.
Signed-off-by: default avatarWalt Feasel <waltfeasel@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d8ea0a16
...@@ -55,7 +55,7 @@ void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo) ...@@ -55,7 +55,7 @@ void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo)
pVBInfo->XGINew_CR97 = 0xc1; pVBInfo->XGINew_CR97 = 0xc1;
pVBInfo->SR18 = XG27_SR18; pVBInfo->SR18 = XG27_SR18;
/*Z11m DDR*/ /* Z11m DDR */
temp = xgifb_reg_get(pVBInfo->P3c4, 0x3B); temp = xgifb_reg_get(pVBInfo->P3c4, 0x3B);
/* SR3B[7][3]MAA15 MAA11 (Power on Trapping) */ /* SR3B[7][3]MAA15 MAA11 (Power on Trapping) */
if (((temp & 0x88) == 0x80) || ((temp & 0x88) == 0x08)) if (((temp & 0x88) == 0x80) || ((temp & 0x88) == 0x08))
...@@ -390,12 +390,12 @@ static void XGI_SetCRT1CRTC(unsigned short ModeIdIndex, ...@@ -390,12 +390,12 @@ static void XGI_SetCRT1CRTC(unsigned short ModeIdIndex,
xgifb_reg_set(pVBInfo->P3d4, 0x14, 0x4F); xgifb_reg_set(pVBInfo->P3d4, 0x14, 0x4F);
} }
/* --------------------------------------------------------------------- */ /*
/* Function : XGI_SetXG21CRTC */ * Function : XGI_SetXG21CRTC
/* Input : Stand or enhance CRTC table */ * Input : Stand or enhance CRTC table
/* Output : Fill CRT Hsync/Vsync to SR2E/SR2F/SR30/SR33/SR34/SR3F */ * Output : Fill CRT Hsync/Vsync to SR2E/SR2F/SR30/SR33/SR34/SR3F
/* Description : Set LCD timing */ * Description : Set LCD timing
/* --------------------------------------------------------------------- */ */
static void XGI_SetXG21CRTC(unsigned short RefreshRateTableIndex, static void XGI_SetXG21CRTC(unsigned short RefreshRateTableIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
...@@ -506,7 +506,7 @@ static void XGI_SetXG27CRTC(unsigned short RefreshRateTableIndex, ...@@ -506,7 +506,7 @@ static void XGI_SetXG27CRTC(unsigned short RefreshRateTableIndex,
/* SR0B */ /* SR0B */
Tempax = XGI_CRT1Table[index].CR[5]; Tempax = XGI_CRT1Table[index].CR[5];
Tempax &= 0xC0; /* Tempax[7:6]: SR0B[7:6]: HRS[9:8]*/ Tempax &= 0xC0; /* Tempax[7:6]: SR0B[7:6]: HRS[9:8] */
Tempbx |= Tempax << 2; /* Tempbx: HRS[9:0] */ Tempbx |= Tempax << 2; /* Tempbx: HRS[9:0] */
Tempax = XGI_CRT1Table[index].CR[4]; /* CR5 HRE */ Tempax = XGI_CRT1Table[index].CR[4]; /* CR5 HRE */
...@@ -636,12 +636,12 @@ static void xgifb_set_lcd(int chip_id, ...@@ -636,12 +636,12 @@ static void xgifb_set_lcd(int chip_id,
xgifb_reg_or(pVBInfo->P3c4, 0x35, 0x80); xgifb_reg_or(pVBInfo->P3c4, 0x35, 0x80);
} }
/* --------------------------------------------------------------------- */ /*
/* Function : XGI_UpdateXG21CRTC */ * Function : XGI_UpdateXG21CRTC
/* Input : */ * Input :
/* Output : CRT1 CRTC */ * Output : CRT1 CRTC
/* Description : Modify CRT1 Hsync/Vsync to fix LCD mode timing */ * Description : Modify CRT1 Hsync/Vsync to fix LCD mode timing
/* --------------------------------------------------------------------- */ */
static void XGI_UpdateXG21CRTC(unsigned short ModeNo, static void XGI_UpdateXG21CRTC(unsigned short ModeNo,
struct vb_device_info *pVBInfo, struct vb_device_info *pVBInfo,
unsigned short RefreshRateTableIndex) unsigned short RefreshRateTableIndex)
...@@ -830,7 +830,7 @@ static unsigned short XGI_GetVCLK2Ptr(unsigned short ModeIdIndex, ...@@ -830,7 +830,7 @@ static unsigned short XGI_GetVCLK2Ptr(unsigned short ModeIdIndex,
/* si+Ext_ResInfo */ /* si+Ext_ResInfo */
modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag; modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
if (pVBInfo->VBInfo & (SetCRT2ToLCD | XGI_SetCRT2ToLCDA)) { /*301b*/ if (pVBInfo->VBInfo & (SetCRT2ToLCD | XGI_SetCRT2ToLCDA)) { /* 301b */
if (pVBInfo->LCDResInfo != Panel_1024x768) if (pVBInfo->LCDResInfo != Panel_1024x768)
/* LCDXlat2VCLK */ /* LCDXlat2VCLK */
VCLKIndex = VCLK108_2_315 + 5; VCLKIndex = VCLK108_2_315 + 5;
...@@ -1620,12 +1620,12 @@ static void XGI_SetLVDSRegs(unsigned short ModeIdIndex, ...@@ -1620,12 +1620,12 @@ static void XGI_SetLVDSRegs(unsigned short ModeIdIndex,
(unsigned short) (temp3 & 0xff)); (unsigned short) (temp3 & 0xff));
} }
/* --------------------------------------------------------------------- */ /*
/* Function : XGI_GETLCDVCLKPtr */ * Function : XGI_GETLCDVCLKPtr
/* Input : */ * Input :
/* Output : al -> VCLK Index */ * Output : al -> VCLK Index
/* Description : */ * Description :
/* --------------------------------------------------------------------- */ */
static void XGI_GetLCDVCLKPtr(unsigned char *di_0, unsigned char *di_1, static void XGI_GetLCDVCLKPtr(unsigned char *di_0, unsigned char *di_1,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
...@@ -2075,7 +2075,7 @@ static unsigned char XGI_GetLCDInfo(unsigned short ModeIdIndex, ...@@ -2075,7 +2075,7 @@ static unsigned char XGI_GetLCDInfo(unsigned short ModeIdIndex,
pVBInfo->LCDTypeInfo = 0; pVBInfo->LCDTypeInfo = 0;
pVBInfo->LCDInfo = 0; pVBInfo->LCDInfo = 0;
/* si+Ext_ResInfo // */ /* si+Ext_ResInfo */
resinfo = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO; resinfo = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
temp = xgifb_reg_get(pVBInfo->P3d4, 0x36); /* Get LCD Res.Info */ temp = xgifb_reg_get(pVBInfo->P3d4, 0x36); /* Get LCD Res.Info */
tempbx = temp & 0x0F; tempbx = temp & 0x0F;
...@@ -2172,12 +2172,12 @@ static unsigned char XG21GPIODataTransfer(unsigned char ujDate) ...@@ -2172,12 +2172,12 @@ static unsigned char XG21GPIODataTransfer(unsigned char ujDate)
return ujRet; return ujRet;
} }
/*----------------------------------------------------------------------------*/ /*
/* output */ * output
/* bl[5] : LVDS signal */ * bl[5] : LVDS signal
/* bl[1] : LVDS backlight */ * bl[1] : LVDS backlight
/* bl[0] : LVDS VDD */ * bl[0] : LVDS VDD
/*----------------------------------------------------------------------------*/ */
static unsigned char XGI_XG21GetPSCValue(struct vb_device_info *pVBInfo) static unsigned char XGI_XG21GetPSCValue(struct vb_device_info *pVBInfo)
{ {
unsigned char CR4A, temp; unsigned char CR4A, temp;
...@@ -2193,12 +2193,12 @@ static unsigned char XGI_XG21GetPSCValue(struct vb_device_info *pVBInfo) ...@@ -2193,12 +2193,12 @@ static unsigned char XGI_XG21GetPSCValue(struct vb_device_info *pVBInfo)
return temp; return temp;
} }
/*----------------------------------------------------------------------------*/ /*
/* output */ * output
/* bl[5] : LVDS signal */ * bl[5] : LVDS signal
/* bl[1] : LVDS backlight */ * bl[1] : LVDS backlight
/* bl[0] : LVDS VDD */ * bl[0] : LVDS VDD
/*----------------------------------------------------------------------------*/ */
static unsigned char XGI_XG27GetPSCValue(struct vb_device_info *pVBInfo) static unsigned char XGI_XG27GetPSCValue(struct vb_device_info *pVBInfo)
{ {
unsigned char CR4A, CRB4, temp; unsigned char CR4A, CRB4, temp;
...@@ -2216,15 +2216,15 @@ static unsigned char XGI_XG27GetPSCValue(struct vb_device_info *pVBInfo) ...@@ -2216,15 +2216,15 @@ static unsigned char XGI_XG27GetPSCValue(struct vb_device_info *pVBInfo)
return temp; return temp;
} }
/*----------------------------------------------------------------------------*/ /*
/* input */ * input
/* bl[5] : 1;LVDS signal on */ * bl[5] : 1;LVDS signal on
/* bl[1] : 1;LVDS backlight on */ * bl[1] : 1;LVDS backlight on
/* bl[0] : 1:LVDS VDD on */ * bl[0] : 1:LVDS VDD on
/* bh: 100000b : clear bit 5, to set bit5 */ * bh: 100000b : clear bit 5, to set bit5
/* 000010b : clear bit 1, to set bit1 */ * 000010b : clear bit 1, to set bit1
/* 000001b : clear bit 0, to set bit0 */ * 000001b : clear bit 0, to set bit0
/*----------------------------------------------------------------------------*/ */
static void XGI_XG21BLSignalVDD(unsigned short tempbh, unsigned short tempbl, static void XGI_XG21BLSignalVDD(unsigned short tempbh, unsigned short tempbl,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
...@@ -3523,7 +3523,7 @@ static void XGI_SetGroup2(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -3523,7 +3523,7 @@ static void XGI_SetGroup2(unsigned short ModeNo, unsigned short ModeIdIndex,
tempcx = 0x0101; tempcx = 0x0101;
if (pVBInfo->VBInfo & SetCRT2ToTV) { /*301b*/ if (pVBInfo->VBInfo & SetCRT2ToTV) { /* 301b */
if (pVBInfo->VGAHDE >= 1024) { if (pVBInfo->VGAHDE >= 1024) {
tempcx = 0x1920; tempcx = 0x1920;
if (pVBInfo->VGAHDE >= 1280) { if (pVBInfo->VGAHDE >= 1280) {
...@@ -3850,12 +3850,12 @@ static void XGI_SetLCDRegs(unsigned short ModeIdIndex, ...@@ -3850,12 +3850,12 @@ static void XGI_SetLCDRegs(unsigned short ModeIdIndex,
} }
} }
/* --------------------------------------------------------------------- */ /*
/* Function : XGI_GetTap4Ptr */ * Function : XGI_GetTap4Ptr
/* Input : */ * Input :
/* Output : di -> Tap4 Reg. Setting Pointer */ * Output : di -> Tap4 Reg. Setting Pointer
/* Description : */ * Description :
/* --------------------------------------------------------------------- */ */
static struct XGI301C_Tap4TimingStruct const static struct XGI301C_Tap4TimingStruct const
*XGI_GetTap4Ptr(unsigned short tempcx, struct vb_device_info *pVBInfo) *XGI_GetTap4Ptr(unsigned short tempcx, struct vb_device_info *pVBInfo)
{ {
...@@ -4397,13 +4397,13 @@ static void xgifb_set_lvds(struct xgifb_video_info *xgifb_info, ...@@ -4397,13 +4397,13 @@ static void xgifb_set_lvds(struct xgifb_video_info *xgifb_info,
} }
} }
/* --------------------------------------------------------------------- */ /*
/* Function : XGI_IsLCDON */ * Function : XGI_IsLCDON
/* Input : */ * Input :
/* Output : 0 : Skip PSC Control */ * Output : 0 : Skip PSC Control
/* 1: Disable PSC */ * 1: Disable PSC
/* Description : */ * Description :
/* --------------------------------------------------------------------- */ */
static unsigned char XGI_IsLCDON(struct vb_device_info *pVBInfo) static unsigned char XGI_IsLCDON(struct vb_device_info *pVBInfo)
{ {
unsigned short tempax; unsigned short tempax;
...@@ -4495,23 +4495,23 @@ static void XGI_DisableBridge(struct xgifb_video_info *xgifb_info, ...@@ -4495,23 +4495,23 @@ static void XGI_DisableBridge(struct xgifb_video_info *xgifb_info,
} }
} }
/* --------------------------------------------------------------------- */ /*
/* Function : XGI_GetTVPtrIndex */ * Function : XGI_GetTVPtrIndex
/* Input : */ * Input :
/* Output : */ * Output :
/* Description : bx 0 : ExtNTSC */ * Description : bx 0 : ExtNTSC
/* 1 : StNTSC */ * 1 : StNTSC
/* 2 : ExtPAL */ * 2 : ExtPAL
/* 3 : StPAL */ * 3 : StPAL
/* 4 : ExtHiTV */ * 4 : ExtHiTV
/* 5 : StHiTV */ * 5 : StHiTV
/* 6 : Ext525i */ * 6 : Ext525i
/* 7 : St525i */ * 7 : St525i
/* 8 : Ext525p */ * 8 : Ext525p
/* 9 : St525p */ * 9 : St525p
/* A : Ext750p */ * A : Ext750p
/* B : St750p */ * B : St750p
/* --------------------------------------------------------------------- */ */
static unsigned short XGI_GetTVPtrIndex(struct vb_device_info *pVBInfo) static unsigned short XGI_GetTVPtrIndex(struct vb_device_info *pVBInfo)
{ {
unsigned short tempbx = 0; unsigned short tempbx = 0;
...@@ -4532,22 +4532,22 @@ static unsigned short XGI_GetTVPtrIndex(struct vb_device_info *pVBInfo) ...@@ -4532,22 +4532,22 @@ static unsigned short XGI_GetTVPtrIndex(struct vb_device_info *pVBInfo)
return tempbx; return tempbx;
} }
/* --------------------------------------------------------------------- */ /*
/* Function : XGI_GetTVPtrIndex2 */ * Function : XGI_GetTVPtrIndex2
/* Input : */ * Input :
/* Output : bx 0 : NTSC */ * Output : bx 0 : NTSC
/* 1 : PAL */ * 1 : PAL
/* 2 : PALM */ * 2 : PALM
/* 3 : PALN */ * 3 : PALN
/* 4 : NTSC1024x768 */ * 4 : NTSC1024x768
/* 5 : PAL-M 1024x768 */ * 5 : PAL-M 1024x768
/* 6-7: reserved */ * 6-7: reserved
/* cl 0 : YFilter1 */ * cl 0 : YFilter1
/* 1 : YFilter2 */ * 1 : YFilter2
/* ch 0 : 301A */ * ch 0 : 301A
/* 1 : 301B/302B/301LV/302LV */ * 1 : 301B/302B/301LV/302LV
/* Description : */ * Description :
/* --------------------------------------------------------------------- */ */
static void XGI_GetTVPtrIndex2(unsigned short *tempbx, unsigned char *tempcl, static void XGI_GetTVPtrIndex2(unsigned short *tempbx, unsigned char *tempcl,
unsigned char *tempch, struct vb_device_info *pVBInfo) unsigned char *tempch, struct vb_device_info *pVBInfo)
{ {
...@@ -4644,12 +4644,12 @@ static void XGI_SetLCDCap_A(unsigned short tempcx, ...@@ -4644,12 +4644,12 @@ static void XGI_SetLCDCap_A(unsigned short tempcx,
} }
} }
/* --------------------------------------------------------------------- */ /*
/* Function : XGI_SetLCDCap_B */ * Function : XGI_SetLCDCap_B
/* Input : cx -> LCD Capability */ * Input : cx -> LCD Capability
/* Output : */ * Output :
/* Description : */ * Description :
/* --------------------------------------------------------------------- */ */
static void XGI_SetLCDCap_B(unsigned short tempcx, static void XGI_SetLCDCap_B(unsigned short tempcx,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
...@@ -4741,12 +4741,12 @@ static void XGI_SetLCDCap(struct vb_device_info *pVBInfo) ...@@ -4741,12 +4741,12 @@ static void XGI_SetLCDCap(struct vb_device_info *pVBInfo)
} }
} }
/* --------------------------------------------------------------------- */ /*
/* Function : XGI_SetAntiFlicker */ * Function : XGI_SetAntiFlicker
/* Input : */ * Input :
/* Output : */ * Output :
/* Description : Set TV Customized Param. */ * Description : Set TV Customized Param.
/* --------------------------------------------------------------------- */ */
static void XGI_SetAntiFlicker(struct vb_device_info *pVBInfo) static void XGI_SetAntiFlicker(struct vb_device_info *pVBInfo)
{ {
unsigned short tempbx; unsigned short tempbx;
...@@ -4863,12 +4863,12 @@ static void XGI_SetYFilter(unsigned short ModeIdIndex, ...@@ -4863,12 +4863,12 @@ static void XGI_SetYFilter(unsigned short ModeIdIndex,
} }
} }
/* --------------------------------------------------------------------- */ /*
/* Function : XGI_OEM310Setting */ * Function : XGI_OEM310Setting
/* Input : */ * Input :
/* Output : */ * Output :
/* Description : Customized Param. for 301 */ * Description : Customized Param. for 301
/* --------------------------------------------------------------------- */ */
static void XGI_OEM310Setting(unsigned short ModeIdIndex, static void XGI_OEM310Setting(unsigned short ModeIdIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
...@@ -4887,12 +4887,12 @@ static void XGI_OEM310Setting(unsigned short ModeIdIndex, ...@@ -4887,12 +4887,12 @@ static void XGI_OEM310Setting(unsigned short ModeIdIndex,
} }
} }
/* --------------------------------------------------------------------- */ /*
/* Function : XGI_SetCRT2ModeRegs */ * Function : XGI_SetCRT2ModeRegs
/* Input : */ * Input :
/* Output : */ * Output :
/* Description : Origin code for crt2group */ * Description : Origin code for crt2group
/* --------------------------------------------------------------------- */ */
static void XGI_SetCRT2ModeRegs(struct vb_device_info *pVBInfo) static void XGI_SetCRT2ModeRegs(struct vb_device_info *pVBInfo)
{ {
unsigned short tempbl; unsigned short tempbl;
...@@ -5437,7 +5437,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, ...@@ -5437,7 +5437,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
pVBInfo->IF_DEF_LVDS = 0; pVBInfo->IF_DEF_LVDS = 0;
if (HwDeviceExtension->jChipType >= XG20) if (HwDeviceExtension->jChipType >= XG20)
pVBInfo->VBType = 0; /*set VBType default 0*/ pVBInfo->VBType = 0; /* set VBType default 0 */
XGIRegInit(pVBInfo, xgifb_info->vga_base); XGIRegInit(pVBInfo, xgifb_info->vga_base);
...@@ -5485,7 +5485,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, ...@@ -5485,7 +5485,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
case VB_CHIP_301: /* fall through */ case VB_CHIP_301: /* fall through */
case VB_CHIP_302: case VB_CHIP_302:
XGI_SetCRT2Group301(ModeNo, HwDeviceExtension, XGI_SetCRT2Group301(ModeNo, HwDeviceExtension,
pVBInfo); /*add for CRT2 */ pVBInfo); /* add for CRT2 */
break; break;
default: default:
...@@ -5494,7 +5494,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info, ...@@ -5494,7 +5494,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
} }
XGI_SetCRT2ModeRegs(pVBInfo); XGI_SetCRT2ModeRegs(pVBInfo);
XGI_OEM310Setting(ModeIdIndex, pVBInfo); /*0212*/ XGI_OEM310Setting(ModeIdIndex, pVBInfo); /* 0212 */
XGI_EnableBridge(xgifb_info, HwDeviceExtension, pVBInfo); XGI_EnableBridge(xgifb_info, HwDeviceExtension, pVBInfo);
} /* !XG20 */ } /* !XG20 */
else { else {
......
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