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

staging: xgifb: vb_setmode.c Align match parenthesis

Make suggested checkpatch modification for
CHECK: Alignment should match open parenthesis
Signed-off-by: default avatarWalt Feasel <waltfeasel@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cf99b357
...@@ -167,7 +167,8 @@ static unsigned char XGI_SetDefaultVCLK(struct vb_device_info *pVBInfo) ...@@ -167,7 +167,8 @@ static unsigned char XGI_SetDefaultVCLK(struct vb_device_info *pVBInfo)
} }
static unsigned char XGI_AjustCRT2Rate(unsigned short ModeIdIndex, static unsigned char XGI_AjustCRT2Rate(unsigned short ModeIdIndex,
unsigned short RefreshRateTableIndex, unsigned short *i, unsigned short RefreshRateTableIndex,
unsigned short *i,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
unsigned short tempax, tempbx, resinfo, modeflag, infoflag; unsigned short tempax, tempbx, resinfo, modeflag, infoflag;
...@@ -1480,17 +1481,14 @@ static void XGI_SetLVDSRegs(unsigned short ModeIdIndex, ...@@ -1480,17 +1481,14 @@ static void XGI_SetLVDSRegs(unsigned short ModeIdIndex,
if (tempcx >= tempax) if (tempcx >= tempax)
tempcx -= tempax; tempcx -= tempax;
xgifb_reg_set(pVBInfo->Part1Port, 0x1b, xgifb_reg_set(pVBInfo->Part1Port, 0x1b, (unsigned short)(tempbx & 0xff));
(unsigned short)(tempbx & 0xff)); xgifb_reg_set(pVBInfo->Part1Port, 0x1c, (unsigned short)(tempcx & 0xff));
xgifb_reg_set(pVBInfo->Part1Port, 0x1c,
(unsigned short)(tempcx & 0xff));
tempbx = (tempbx >> 8) & 0x07; tempbx = (tempbx >> 8) & 0x07;
tempcx = (tempcx >> 8) & 0x07; tempcx = (tempcx >> 8) & 0x07;
xgifb_reg_set(pVBInfo->Part1Port, 0x1d, xgifb_reg_set(pVBInfo->Part1Port, 0x1d, (unsigned short)((tempcx << 3) |
(unsigned short)((tempcx << 3) tempbx));
| tempbx));
tempax = pVBInfo->VT; tempax = pVBInfo->VT;
tempbx = LCDPtr1->LCDVRS; tempbx = LCDPtr1->LCDVRS;
...@@ -1504,10 +1502,8 @@ static void XGI_SetLVDSRegs(unsigned short ModeIdIndex, ...@@ -1504,10 +1502,8 @@ static void XGI_SetLVDSRegs(unsigned short ModeIdIndex,
if (tempcx >= tempax) if (tempcx >= tempax)
tempcx -= tempax; tempcx -= tempax;
xgifb_reg_set(pVBInfo->Part1Port, 0x18, xgifb_reg_set(pVBInfo->Part1Port, 0x18, (unsigned short)(tempbx & 0xff));
(unsigned short)(tempbx & 0xff)); xgifb_reg_and_or(pVBInfo->Part1Port, 0x19, ~0x0f, (unsigned short)(tempcx & 0x0f));
xgifb_reg_and_or(pVBInfo->Part1Port, 0x19, ~0x0f,
(unsigned short)(tempcx & 0x0f));
tempax = ((tempbx >> 8) & 0x07) << 3; tempax = ((tempbx >> 8) & 0x07) << 3;
...@@ -1518,8 +1514,7 @@ static void XGI_SetLVDSRegs(unsigned short ModeIdIndex, ...@@ -1518,8 +1514,7 @@ static void XGI_SetLVDSRegs(unsigned short ModeIdIndex,
if (pVBInfo->LCDInfo & XGI_EnableLVDSDDA) if (pVBInfo->LCDInfo & XGI_EnableLVDSDDA)
tempax |= 0x40; tempax |= 0x40;
xgifb_reg_and_or(pVBInfo->Part1Port, 0x1a, 0x07, xgifb_reg_and_or(pVBInfo->Part1Port, 0x1a, 0x07, tempax);
tempax);
tempbx = pVBInfo->VDE; tempbx = pVBInfo->VDE;
tempax = pVBInfo->VGAVDE; tempax = pVBInfo->VGAVDE;
...@@ -1535,10 +1530,8 @@ static void XGI_SetLVDSRegs(unsigned short ModeIdIndex, ...@@ -1535,10 +1530,8 @@ static void XGI_SetLVDSRegs(unsigned short ModeIdIndex,
temp2 = temp1; temp2 = temp1;
push3 = temp2; push3 = temp2;
xgifb_reg_set(pVBInfo->Part1Port, 0x37, xgifb_reg_set(pVBInfo->Part1Port, 0x37, (unsigned short)(temp2 & 0xff));
(unsigned short)(temp2 & 0xff)); xgifb_reg_set(pVBInfo->Part1Port, 0x36, (unsigned short)((temp2 >> 8) & 0xff));
xgifb_reg_set(pVBInfo->Part1Port, 0x36,
(unsigned short)((temp2 >> 8) & 0xff));
tempbx = (unsigned short)(temp2 >> 16); tempbx = (unsigned short)(temp2 >> 16);
tempax = tempbx & 0x03; tempax = tempbx & 0x03;
...@@ -1559,18 +1552,14 @@ static void XGI_SetLVDSRegs(unsigned short ModeIdIndex, ...@@ -1559,18 +1552,14 @@ static void XGI_SetLVDSRegs(unsigned short ModeIdIndex,
(unsigned short)((temp2 >> 8) & (unsigned short)((temp2 >> 8) &
0xff)); 0xff));
tempbx = (unsigned short)(temp2 >> 16); tempbx = (unsigned short)(temp2 >> 16);
xgifb_reg_and_or(pVBInfo->Part4Port, 0x3a, xgifb_reg_and_or(pVBInfo->Part4Port, 0x3a, ~0xc0,
~0xc0, (unsigned short)((tempbx & 0xff) << 6));
(unsigned short)((tempbx &
0xff) << 6));
tempcx = pVBInfo->VGAVDE; tempcx = pVBInfo->VGAVDE;
if (tempcx == pVBInfo->VDE) if (tempcx == pVBInfo->VDE)
xgifb_reg_and_or(pVBInfo->Part4Port, xgifb_reg_and_or(pVBInfo->Part4Port, 0x30, ~0x0c, 0x00);
0x30, ~0x0c, 0x00);
else else
xgifb_reg_and_or(pVBInfo->Part4Port, xgifb_reg_and_or(pVBInfo->Part4Port, 0x30, ~0x0c, 0x08);
0x30, ~0x0c, 0x08);
} }
tempcx = pVBInfo->VGAHDE; tempcx = pVBInfo->VGAHDE;
...@@ -1604,20 +1593,16 @@ static void XGI_SetLVDSRegs(unsigned short ModeIdIndex, ...@@ -1604,20 +1593,16 @@ static void XGI_SetLVDSRegs(unsigned short ModeIdIndex,
tempax = ((tempbx >> 8) & 0xff) << 3; tempax = ((tempbx >> 8) & 0xff) << 3;
tempax |= (unsigned short)((temp3 >> 8) & 0x07); tempax |= (unsigned short)((temp3 >> 8) & 0x07);
xgifb_reg_set(pVBInfo->Part1Port, 0x20, xgifb_reg_set(pVBInfo->Part1Port, 0x20, (unsigned short)(tempax & 0xff));
(unsigned short)(tempax & 0xff)); xgifb_reg_set(pVBInfo->Part1Port, 0x21, (unsigned short)(tempbx & 0xff));
xgifb_reg_set(pVBInfo->Part1Port, 0x21,
(unsigned short)(tempbx & 0xff));
temp3 >>= 16; temp3 >>= 16;
if (modeflag & HalfDCLK) if (modeflag & HalfDCLK)
temp3 >>= 1; temp3 >>= 1;
xgifb_reg_set(pVBInfo->Part1Port, 0x22, xgifb_reg_set(pVBInfo->Part1Port, 0x22, (unsigned short)((temp3 >> 8) & 0xff));
(unsigned short)((temp3 >> 8) & 0xff)); xgifb_reg_set(pVBInfo->Part1Port, 0x23, (unsigned short)(temp3 & 0xff));
xgifb_reg_set(pVBInfo->Part1Port, 0x23,
(unsigned short)(temp3 & 0xff));
} }
/* /*
...@@ -1645,7 +1630,8 @@ static void XGI_GetLCDVCLKPtr(unsigned char *di_0, unsigned char *di_1, ...@@ -1645,7 +1630,8 @@ static void XGI_GetLCDVCLKPtr(unsigned char *di_0, unsigned char *di_1,
} }
static unsigned char XGI_GetVCLKPtr(unsigned short RefreshRateTableIndex, static unsigned char XGI_GetVCLKPtr(unsigned short RefreshRateTableIndex,
unsigned short ModeIdIndex, struct vb_device_info *pVBInfo) unsigned short ModeIdIndex,
struct vb_device_info *pVBInfo)
{ {
unsigned short index, modeflag; unsigned short index, modeflag;
unsigned char tempal; unsigned char tempal;
...@@ -1871,8 +1857,7 @@ void XGI_GetVBType(struct vb_device_info *pVBInfo) ...@@ -1871,8 +1857,7 @@ void XGI_GetVBType(struct vb_device_info *pVBInfo)
pVBInfo->VBType = tempbx; pVBInfo->VBType = tempbx;
} }
static void XGI_GetVBInfo(unsigned short ModeIdIndex, static void XGI_GetVBInfo(unsigned short ModeIdIndex, struct vb_device_info *pVBInfo)
struct vb_device_info *pVBInfo)
{ {
unsigned short tempax, push, tempbx, temp, modeflag; unsigned short tempax, push, tempbx, temp, modeflag;
...@@ -1997,8 +1982,7 @@ static void XGI_GetVBInfo(unsigned short ModeIdIndex, ...@@ -1997,8 +1982,7 @@ static void XGI_GetVBInfo(unsigned short ModeIdIndex,
pVBInfo->VBInfo = tempbx; pVBInfo->VBInfo = tempbx;
} }
static void XGI_GetTVInfo(unsigned short ModeIdIndex, static void XGI_GetTVInfo(unsigned short ModeIdIndex, struct vb_device_info *pVBInfo)
struct vb_device_info *pVBInfo)
{ {
unsigned short tempbx = 0, resinfo = 0, modeflag, index1; unsigned short tempbx = 0, resinfo = 0, modeflag, index1;
...@@ -3650,8 +3634,7 @@ static void XGI_SetGroup2(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -3650,8 +3634,7 @@ static void XGI_SetGroup2(unsigned short ModeNo, unsigned short ModeIdIndex,
} }
} }
static void XGI_SetLCDRegs(unsigned short ModeIdIndex, static void XGI_SetLCDRegs(unsigned short ModeIdIndex, struct vb_device_info *pVBInfo)
struct vb_device_info *pVBInfo)
{ {
unsigned short pushbx, tempax, tempbx, tempcx, temp, tempah, unsigned short pushbx, tempax, tempbx, tempcx, temp, tempah,
tempbh, tempch; tempbh, tempch;
...@@ -4126,8 +4109,7 @@ static void XGI_SetGroup4(unsigned short ModeIdIndex, ...@@ -4126,8 +4109,7 @@ static void XGI_SetGroup4(unsigned short ModeIdIndex,
| TVSetHiVision))) { | TVSetHiVision))) {
temp |= 0x0001; temp |= 0x0001;
if ((pVBInfo->VBInfo & SetInSlaveMode) && if ((pVBInfo->VBInfo & SetInSlaveMode) &&
!(pVBInfo->TVInfo !(pVBInfo->TVInfo & TVSimuMode))
& TVSimuMode))
temp &= (~0x0001); temp &= (~0x0001);
} }
} }
...@@ -4168,7 +4150,8 @@ static void XGI_DisableGatingCRT(struct vb_device_info *pVBInfo) ...@@ -4168,7 +4150,8 @@ static void XGI_DisableGatingCRT(struct vb_device_info *pVBInfo)
} }
static unsigned char XGI_XG21CheckLVDSMode(struct xgifb_video_info *xgifb_info, static unsigned char XGI_XG21CheckLVDSMode(struct xgifb_video_info *xgifb_info,
unsigned short ModeNo, unsigned short ModeIdIndex) unsigned short ModeNo,
unsigned short ModeIdIndex)
{ {
unsigned short xres, yres, colordepth, modeflag, resindex; unsigned short xres, yres, colordepth, modeflag, resindex;
...@@ -4652,12 +4635,11 @@ static void XGI_SetLCDCap_B(unsigned short tempcx, ...@@ -4652,12 +4635,11 @@ static void XGI_SetLCDCap_B(unsigned short tempcx,
{ {
if (tempcx & EnableLCD24bpp) /* 24bits */ if (tempcx & EnableLCD24bpp) /* 24bits */
xgifb_reg_and_or(pVBInfo->Part2Port, 0x1A, 0xE0, xgifb_reg_and_or(pVBInfo->Part2Port, 0x1A, 0xE0,
(unsigned short)(((tempcx & 0x00ff) >> 6) (unsigned short)(((tempcx & 0x00ff) >> 6) | 0x0c));
| 0x0c));
else else
xgifb_reg_and_or(pVBInfo->Part2Port, 0x1A, 0xE0, xgifb_reg_and_or(pVBInfo->Part2Port, 0x1A, 0xE0,
(unsigned short)(((tempcx & 0x00ff) >> 6) (unsigned short)(((tempcx & 0x00ff) >> 6) | 0x18));
| 0x18)); /* Enable Dither */ /* Enable Dither */
} }
static void XGI_LongWait(struct vb_device_info *pVBInfo) static void XGI_LongWait(struct vb_device_info *pVBInfo)
...@@ -4720,8 +4702,8 @@ static void XGI_SetLCDCap(struct vb_device_info *pVBInfo) ...@@ -4720,8 +4702,8 @@ static void XGI_SetLCDCap(struct vb_device_info *pVBInfo)
/* VB Driving */ /* VB Driving */
xgifb_reg_and_or(pVBInfo->Part4Port, 0x0D, xgifb_reg_and_or(pVBInfo->Part4Port, 0x0D,
~((EnableVBCLKDRVLOW | EnablePLLSPLOW) >> 8), ~((EnableVBCLKDRVLOW | EnablePLLSPLOW) >> 8),
(unsigned short)((tempcx & (EnableVBCLKDRVLOW (unsigned short)((tempcx & (EnableVBCLKDRVLOW |
| EnablePLLSPLOW)) >> 8)); EnablePLLSPLOW)) >> 8));
if (pVBInfo->VBInfo & SetCRT2ToLCD) if (pVBInfo->VBInfo & SetCRT2ToLCD)
XGI_SetLCDCap_B(tempcx, pVBInfo); XGI_SetLCDCap_B(tempcx, pVBInfo);
...@@ -5062,7 +5044,8 @@ void XGI_LockCRT2(struct vb_device_info *pVBInfo) ...@@ -5062,7 +5044,8 @@ void XGI_LockCRT2(struct vb_device_info *pVBInfo)
} }
unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE, unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE,
unsigned short ModeNo, unsigned short ModeIdIndex, unsigned short ModeNo,
unsigned short ModeIdIndex,
struct vb_device_info *pVBInfo) struct vb_device_info *pVBInfo)
{ {
const u8 LCDARefreshIndex[] = { const u8 LCDARefreshIndex[] = {
......
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