summaryrefslogtreecommitdiffstats
path: root/drivers/staging/xgifb
Commit message (Collapse)AuthorAgeFilesLines
* staging: xgifb: remove use of __devexitBill Pemberton2012-11-221-1/+1
| | | | | | | | CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: remove use of __devinitBill Pemberton2012-11-221-1/+1
| | | | | | | | CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: remove use of __devexit_pBill Pemberton2012-11-221-1/+1
| | | | | | | | CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: make remaining data tables constAaro Koskinen2012-11-133-19/+19
| | | | | | | 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>
* staging: xgifb: constify Tap4 dataAaro Koskinen2012-11-132-10/+8Star
| | | | | | | 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>
* staging: xgifb: eliminate pVBInfo->AGPRegAaro Koskinen2012-11-135-6/+5Star
| | | | | | | 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>
* staging: xgifb: eliminate pVBInfo->SR16Aaro Koskinen2012-11-134-8/+4Star
| | | | | | | 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>
* staging: xgifb: eliminate pVBInfo->CR6BAaro Koskinen2012-11-135-5/+3Star
| | | | | | | 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>
* staging: xgifb: eliminate pVBInfo->SR21/22/25Aaro Koskinen2012-11-134-13/+3Star
| | | | | | | In-line constants that are used only once. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: eliminate pVBInfo->StResInfoAaro Koskinen2012-11-133-11/+0Star
| | | | | | | Delete unused data. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: eliminate pVBInfo->ModeResInfoAaro Koskinen2012-11-133-14/+12Star
| | | | | | | 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>
* staging: xgifb: eliminate pVBInfo->ScreenOffsetAaro Koskinen2012-11-133-5/+3Star
| | | | | | | 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>
* staging: xgifb: eliminate pVBInfo->VCLKData/VBVCLKDataAaro Koskinen2012-11-135-22/+15Star
| | | | | | | 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>
* staging: xgifb: eliminate pVBInfo->ECLKDataAaro Koskinen2012-11-135-10/+9Star
| | | | | | | 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>
* staging: xgifb: eliminate pVBInfo->CR6E/6F/89Aaro Koskinen2012-11-134-16/+4Star
| | | | | | | 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>
* staging: xgifb: eliminate pVBInfo->UpdateCRT1Aaro Koskinen2012-11-133-8/+5Star
| | | | | | | 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>
* staging: xgifb: eliminate pVBInfo->XGINEWUB_CRT1TableAaro Koskinen2012-11-135-60/+56Star
| | | | | | | 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>
* staging: xgifb: eliminate pVBInfo->RefIndexAaro Koskinen2012-11-135-53/+51Star
| | | | | | | 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>
* staging: xgifb: eliminate pVBInfo->EModeIDTableAaro Koskinen2012-11-135-58/+58
| | | | | | | 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>
* staging: xgifb: eliminate pVBInfo->StandTableAaro Koskinen2012-11-133-9/+7Star
| | | | | | | 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>
* staging: xgifb: eliminate global TimingV/TimingH dataAaro Koskinen2012-11-133-21/+15Star
| | | | | | | | 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>
* staging: xgifb: refactor XGI_GetLVDSData()Aaro Koskinen2012-11-131-29/+27Star
| | | | | | | Refactor XGI_GetLVDSData() to avoid nesting and redundant ifs. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: vb_init.h: delete redundant declarationAaro Koskinen2012-11-131-1/+0Star
| | | | | | | XGI21_LCDCapList does not exist. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: constify LCD dataAaro Koskinen2012-11-133-107/+107
| | | | | | | 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>
* staging: xgifb: XGI_GetLcdPtr: pass the table pointer directlyAaro Koskinen2012-11-131-63/+30Star
| | | | | | | | Let the caller pass the table pointer directly instead of using a magic number to indicate which table to use. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: XGI_GetLcdPtr: delete redundant codeAaro Koskinen2012-11-131-18/+1Star
| | | | | | | | tempal is a write-only stack variable, and code touching it can be deleted. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: XGI_GetLcdPtr: use real pointers for data tablesAaro Koskinen2012-11-133-445/+119Star
| | | | | | | 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>
* staging: xgifb: XGI_GetLcdPtr: replace xgifb_epllcd_crt1Aaro Koskinen2012-11-132-13/+30
| | | | | | | | 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>
* staging: xgifb: XGI_GetLcdPtr: add separate table for VB_SIS301LV/VB_SIS302LVAaro Koskinen2012-11-132-41/+61
| | | | | | | | 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>
* staging "xgifb" Fix typos.Justin P. Mattock2012-10-222-3/+3
| | | | | Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: delete bogus video RAM configurationAaro Koskinen2012-09-141-1/+0Star
| | | | | | | | | | | The driver reconfigures DRAM size register to 8M (regardless what the actual size was) once the init has been completed, overwriting the correct value written during the early init. As a result if the driver is unloaded and reloaded, the user will be limited to 8M video memory and may lose some of the available video modes. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: setup initial video RAM size for systems without BIOSAaro Koskinen2012-09-141-4/+6
| | | | | | | | | | | | On embedded systems without a BIOS, the DRAM sizing register is 0 after the boot, and the driver thinks we have only 1 MB video memory. On such cases, use the PCI window size for the initial size. This information is needed only to create the I/O mapping - the driver will later detect and configure the memory size correctly. Limit the size to 16 MB as it should be sufficient for all supported video modes. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: prevent video RAM size exceeding PCI window sizeAaro Koskinen2012-09-121-0/+4
| | | | | | | | Add a sanity check for the video RAM size. It should fit into the PCI window. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: validate the mode against video memory sizeAaro Koskinen2012-09-121-2/+9
| | | | | | | | | | | It's possible to select video mode that exceeds the available video memory. This is potentially dangerous, fix by adding a check. The patch fixes system hangs seen occasionally when playing random videos with mplayer. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: delete redundant castsAaro Koskinen2012-09-111-54/+29Star
| | | | | | | Delete some redundant casts. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: use correct type for VBVCLKDataAaro Koskinen2012-09-112-4/+4
| | | | | | | Use correct type to eliminate casting. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: delete ISXPDOSAaro Koskinen2012-09-113-6/+1Star
| | | | | | | Delete unneeded flag. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: mark constant data with constAaro Koskinen2012-09-112-16/+16
| | | | | | | Mark some data tables as const. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: access static data tables directlyAaro Koskinen2012-09-112-43/+14Star
| | | | | | | Access some data tables directly instead of using pointers. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: use "else if"Aaro Koskinen2012-09-112-97/+74Star
| | | | | | | Use "else if" when possible to reduce nesting. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: delete XGI_LCDDataTablStructAaro Koskinen2012-09-111-7/+0Star
| | | | | | | Delete an unused structure. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: delete LCDLenListAaro Koskinen2012-09-113-33/+1Star
| | | | | | | | 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>
* staging: xgifb: XGI_GetLcdPtr: delete dead codeAaro Koskinen2012-09-111-8/+2Star
| | | | | | | Only table values 0..5 are ever used. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: delete Chrontel 7017 LCD dataAaro Koskinen2012-09-112-26/+0Star
| | | | | | | Delete unused Chrontel 7017 LCD data. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: use a real pointer for TV DATAPTRAaro Koskinen2012-09-113-63/+17Star
| | | | | | | 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>
* staging: xgifb: use proper typing for TV dataAaro Koskinen2012-09-113-30/+18Star
| | | | | | | | 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>
* staging: xgifb: delete Chrontel TV dataAaro Koskinen2012-09-112-50/+4Star
| | | | | | | Delete unused Chrontel TV data. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: XGI_GetTVPtr: drop the table parameterAaro Koskinen2012-09-111-100/+50Star
| | | | | | | Only one TV data table is used by the driver, delete unneeded complexity. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: avoid copy-pasting LCD dataAaro Koskinen2012-09-111-34/+3Star
| | | | | | | | 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>
* staging: xgifb: delete redundant chip type checkAaro Koskinen2012-09-111-3/+1Star
| | | | | | | All chip type values are covered by (chip >= XG20 || chip >= XG40). Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>