summaryrefslogtreecommitdiff
path: root/drivers/staging/xgifb/vb_table.h
AgeCommit message (Collapse)Author
2017-06-23staging: fb_xgi: vb_table: Remove white space after tabstopMatthew Reed
Remove white space after tabstop on closing bracket as suggested by checkpatch.pl. Additional white space removed for page consistency. Signed-off-by: Matthew Reed <4d5452@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-16staging: xgifb: vb_table.h Preferred space aroundWalt Feasel
Make suggested modification from checkpatch in reference to: CHECK: spaces preferred around that '+' Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-16staging: xgifb: vb_table.h Blank line after declarationsWalt Feasel
Make suggested modification from checkpatch in reference to: CHECK: Please use a blank line after function/struct/union/enum declarations Signed-off-by: Walt Feasel <waltfeasel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-30staging: xgifb: fix block commentsClifton Barnes
fix checkpatch.pl warning about 'Block comments use a trailing */ on a separate line' and 'Block comments use * on subsequent lines' Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: xgifb: Avoid multiple blank linesRehas Sachdeva
This patch removes the checkpatch.pl warnings regarding multiple blank lines as single blank line is the preferred coding style. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14Staging: xgifb: remove space before semicolonAshvini Varatharaj
Fix checkpatch warning: WARNING:space prohibited before semicolon Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-28staging: xgifb: rename SR15/SR13 arrays to SR18Aaro Koskinen
Since we are programming SR register 18, better name structs/arrays accordingly to avoid confusion. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-28staging: xgifb: make SR15/SR13 arrays single dimensionalAaro Koskinen
Since we only access the third row, we can delete the others. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-28staging: xgifb: XGINew_SetDRAMDefaultRegister340: inline the value of SR1BAaro Koskinen
SR1B register value is always 3 regardless of video card or RAM type. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-28staging: xgifb: delete XGI330_LCDCapStruct.PWD_2xAaro Koskinen
Delete unused XGI330_LCDCapStruct fields. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-28staging: xgifb: delete XGI330_LCDCapStruct.PSC_SxAaro Koskinen
Delete unused XGI330_LCDCapStruct fields. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-28staging: xgifb: delete LCD_SetFlagAaro Koskinen
Delete redundant XGI330_LCDCapStruct field. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-05staging/xgifb: Remove unused values in XGI340_ECLKDataPeter Huewe
In the lookup table XGI340_ECLKData only the first three 'lines' are used, thus the remaining entries can be removed. Rationale: - vb_init.c uses pVBInfo->ram_type as the index for XGI340_ECLKData. - pVBInfo->ram_type is assigned the return value of XGINew_GetXG20DRAMType which can only be 0, 1 or 2 -> only the first three values are used. -> remove the remeining entries. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-05staging/xgifb: Remove unused entries in XGI340New_MCLKData and XGI27New_MCLKDataPeter Huewe
In the lookup tables XGI340New_MCLKData and XGI27New_MCLKData only the first three 'lines' are used, thus the remaining fields can be removed. Rationale: - vb_init.c uses pVBInfo->ram_type as the index for pVBInfo->MCLKData - pVBInfo->ram_type is assigned the return value of XGINew_GetXG20DRAMType which can only be 0, 1 or 2 - pVBInfo->MCLKData is assigned to either XGI340New_MCLKData or XGI27New_MCLKData in vb_setmode.c -> only the first three values are used, the rest can be removed. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-05staging/xgifb: Remove unused values in XG27_SR13 and XGI340_SR13Peter Huewe
In the lookup tables XG27_SR13 and XGI340_SR13 only the first three values are used of each 'line', thus the remaining fields can be removed. Rationale: - vb_init.c uses pVBInfo->ram_type for the 'column' index for pVBInfo->SR15. - pVBInfo->ram_type is assigned the return value of XGINew_GetXG20DRAMType which can only be 0, 1 or 2 - pVBInfo->SR15 is assigned to either XG27_SR13 or XGI340_SR13 in vb_setmode.c -> only the first three values are used. This becomes also evident as values 3-7 are all 0. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-05staging/xgifb: Remove unused values in XGI340_cr41 and XGI27_cr41Peter Huewe
In the lookup tables XGI340_cr41 and XGI27_cr41 only the first three values are used of each 'line', thus the remaining fields can be removed. Rationale: - vb_init.c uses pVBInfo->ram_type for the 'column' index for pVBInfo->CR40. - pVBInfo->ram_type is assigned the return value of XGINew_GetXG20DRAMType which can only be 0, 1 or 2 - pVBInfo->CR40 is assigned to either XGI340_cr41 or XGI27_cr41 in vb_setmode.c -> only the first three values are used. This becomes also evident as values 3-7 are all 0. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-05staging/xgifb: Replace XGI340_CR6B table with simple if/elsePeter Huewe
The XGI340_CR6B lookup table consists of the entries {0xaa, 0xaa, 0xaa, 0xaa} for an index <= 2 and {0x00, 0x00, 0x00, 0x00} for all other indices. The only user XGINew_SetDRAMDefaultRegister340 loops over these 4 values of a line with a for loop and since all entries are the same for each line we can simply replace the whole lookup table with a simple if/else assignment. Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-04staging/xgifb: Simplify XGI_SetSeqRegsPeter Huewe
Since SR[0] in the (readonly) XGI330_StandTable is always 0x01 we can skip or'ing with 0x01 and make the code simpler by removing the if statements. Since this function is the only user of the XGI330_StandTable we can also include the unconditional |= 0x20 into the input data and move the assignment to SR1 into the loop, which I prefer to start at 0. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: xgifb: make remaining data tables constAaro Koskinen
Remaining vb_table.h data can be trivially made const. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: xgifb: constify Tap4 dataAaro Koskinen
Make Tap4 data const and adjust functions accordingly. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: xgifb: eliminate pVBInfo->AGPRegAaro Koskinen
Access XGI340_AGPReg directly and make it const. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: xgifb: eliminate pVBInfo->SR16Aaro Koskinen
Inline constant values that are used only once. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: xgifb: eliminate pVBInfo->CR6BAaro Koskinen
Access XGI340_CR6B directly and make it const. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: xgifb: eliminate pVBInfo->StResInfoAaro Koskinen
Delete unused data. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: xgifb: eliminate pVBInfo->ModeResInfoAaro Koskinen
Access XGI330_ModeResInfo directly and make it const. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: xgifb: eliminate pVBInfo->ScreenOffsetAaro Koskinen
Access XGI330_ScreenOffset directly and make it const. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: xgifb: eliminate pVBInfo->VCLKData/VBVCLKDataAaro Koskinen
Access XGI_VCLKData and XGI_VBVCLKData directly and make them const. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: xgifb: eliminate pVBInfo->ECLKDataAaro Koskinen
Access XGI340_ECLKData directly and make it const. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: xgifb: eliminate pVBInfo->CR6E/6F/89Aaro Koskinen
Eliminate dummy zero read-only global data. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: xgifb: eliminate pVBInfo->UpdateCRT1Aaro Koskinen
Access XGI_UpdateCRT1Table directly and make it const. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: xgifb: eliminate pVBInfo->XGINEWUB_CRT1TableAaro Koskinen
Access XGI_CRT1Table directly and make it const. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: xgifb: eliminate pVBInfo->RefIndexAaro Koskinen
Access XGI330_RefIndex directly and make it const. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: xgifb: eliminate pVBInfo->EModeIDTableAaro Koskinen
Access XGI330_EModeIDTable directly and make it const. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: xgifb: eliminate pVBInfo->StandTableAaro Koskinen
Access XGI330_StandTable directly and make it const. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: xgifb: eliminate global TimingV/TimingH dataAaro Koskinen
Use private data instead of global variables for timing data. Also, get rid of the single element arrays. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: xgifb: constify LCD dataAaro Koskinen
Make read-only LCD data tables const. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: xgifb: XGI_GetLcdPtr: use real pointers for data tablesAaro Koskinen
Use real pointers for LCD data tables to simplify the code. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: xgifb: XGI_GetLcdPtr: replace xgifb_epllcd_crt1Aaro Koskinen
Replace xgifb_epllcd_crt1 with two different tables to make further cleanups easier. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: xgifb: XGI_GetLcdPtr: add separate table for VB_SIS301LV/VB_SIS302LVAaro Koskinen
Add a separate data table for VB_SIS301LV/VB_SIS302LV to avoid branching and to make further cleanups easier. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-10staging: xgifb: use correct type for VBVCLKDataAaro Koskinen
Use correct type to eliminate casting. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-10staging: xgifb: mark constant data with constAaro Koskinen
Mark some data tables as const. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-10staging: xgifb: delete LCDLenListAaro Koskinen
LCDLenList is redundant. It's only used for modifying a write-only stack variable. Delete also related #defines. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-10staging: xgifb: delete Chrontel 7017 LCD dataAaro Koskinen
Delete unused Chrontel 7017 LCD data. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-10staging: xgifb: use a real pointer for TV DATAPTRAaro Koskinen
Replace DATAPTR numbers with a real pointer to make code simpler. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-10staging: xgifb: use proper typing for TV dataAaro Koskinen
There's a dangerous cast from XGI330_TVDataStruct to SiS_TVData. Use SiS_TVData everywhere, also the data can be made const. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-10staging: xgifb: delete Chrontel TV dataAaro Koskinen
Delete unused Chrontel TV data. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-10staging: xgifb: avoid copy-pasting LCD dataAaro Koskinen
Share the common data tables instead of having the same data in multiple tables. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-11Staging: xgifb: Fix coding style.Miguel Gómez
Fix small coding style warnings in several files. Signed-off-by: Miguel Gómez <magomez@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-11Staging: xgifb: Comment cleaning.Miguel Gómez
Remove commented code and useless comments. Leave only those with relevant hints to the code. Signed-off-by: Miguel Gómez <magomez@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13staging/xgifb: Cleanup vb_device_info structPeter Huewe
This patch cleans up the vb_device_info struct and the related functions. The cleanup decreases the size of the compiled module by about 10kB. == Remove fields in vb_device_info that are never read: == pOutputSelect pRGBSenseData pRGBSenseData2 pVideoSenseData pVideoSenseData2 pYCSenseData pYCSenseData2 CR49 pXGINew_I2CDefinition pCR2E pCR2F pCR46 pCR47 pCRD0 pCRDE pSR40 pSR41 pCR47 === Remove the corresponding 'constants' === XGI330_RGBSenseData XGI330_RGBSenseData2 XGI330_VideoSenseData XGI330_VideoSenseData2 XGI330_YCSenseData XGI330_YCSenseData2 XGI330_CR49 XG40_I2CDefinition XG21_CR2E XG21_CR2F XG21_CR46 XG21_CR47 XG27_CRD0 XG27_CRDE XGI330_OutputSelect == Remove 'constant fields' and replace constant value with #define == pSR07 = XGI330_SR07 -> 0x18 pSR1F = XGI330_SR1F -> 0 pSR23 = XGI330_SR23 -> 0xf6 pSR24 = XGI330_SR24 -> 0x0d pSR33 = XGI330_SR33 ->0 pCRT2Data_1_2 = XGI330_CRT2Data_1_2 -> 0 pCRT2Data_4_D = XGI330_CRT2Data_4_D -> 0 pCRT2Data_4_E = XGI330_CRT2Data_4_E -> 0 pCRT2Data_4_10 = XGI330_CRT2Data_4_10 -> 0x80 pSR36 = XG27_SR36 -> 0x30 pCR8F = &XG27_CR8F -> 0x0C pSR40 = XG27_SR40 -> 0x04 pSR41 = XG27_SR41 ->0x00 pSR31 = XGI330_SR31 -> 0xc0 pSR32 = XGI330_SR32 -> 0xc0 SR25 = XGI330_sr25 -> 0 (we only use XGI330_sr25[0]) == Constant fields with 'dead' code: == pSoftSetting is set to XGI330_SoftSetting = 0x30 -> if (*pVBInfo->pSoftSetting & SoftDRAMType) is never true since SoftDRAMType = 0x80 -> if (*pVBInfo->pSoftSetting & ModeSoftSetting) is never true since ModeSoftSetting = 0x04 --> remove the code, remove pSoftSetting, remove XGI330_SoftSetting pDVOSetting is set to XG21_DVOSetting = 0 -> if (((*pVBInfo->pDVOSetting) & 0xC0) == 0xC0) is never true --> remove the code, remove pDVOSetting, remove XG21_DVOSetting pXGINew_DRAMTypeDefinition is set to &XG40_DRAMTypeDefinition 0xFF -> if (*pVBInfo->pXGINew_DRAMTypeDefinition != 0x0C) is always true --> remove the if and remove pXGINew_DRAMTypeDefinition remove XG40_DRAMTypeDefinition == Replace pointer to unsigned char with unsigned char variable and assign value of referenced pointer: == pSR21 -> SR21, remove XGI330_SR21 pSR22 -> SR22, remove XGI330_SR22 pXGINew_CR97 -> XGINew_CR97, remove XG20_CR97, XG27_CR97 and Z11m_CR97 Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>