aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/xgifb (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-04-10staging/xgifb: fix display on XGI Volari Z11m cardsDmitry Eremin-Solenikov3-2/+18
Image on Z11m cards was totally garbled due to wrong memory being selected. Add a special handling for Z11m cards. Tested on PCIe Z11 and Z11m cards. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10staging/xgifb: remove remaining duplicate initdef.h definesPeter Huewe1-106/+1
This patch removes the remaining defines that are already defined identically in the sis initdef.h header. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10staging/xgifb: Use TVCLKBASE_315 as a base addressPeter Huewe2-18/+12
Since the defines TVVCLKDIV2, TVVCLK, HiTVVCLKDIV2, HiTVVCLK, HiTVSimuVCLK and HiTVTextVCLK are now defined as relative values, we have to use TVCLKBASE_315 (0x31) as a base address to get the same values as before the merge. The old and now duplicated defines were removed Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10staging/xgifb: Rename XGI specific initdef.h definesPeter Huewe3-84/+84
This patch renames some of the defines that exist in the sis initdef.h but seem to have a different value. In order to preserve the functionality of the driver, we simply prepend these defines with XGI_ (for now) to resolve conflicts and review them later on. Renames: SetCRT2ToLCDA -> XGI_SetCRT2ToLCDA LCDVESATiming -> XGI_LCDVESATiming EnableLVDSDDA -> XGI_EnableLVDSDDA LCDDualLink -> XGI_LCDDualLink ModeSwitchStatus -> XGI_ModeSwitchStatus YPbPr750pVCLK -> XGI_YPbPr750pVCLK Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10staging/xgifb: Rename remaining sis initdef.h defines and remove duplicatesPeter Huewe5-276/+251
This patch renames the remaining duplicate defines and their usage to the naming convention of the sis initdef.h and removes the now duplicated defines. Renames: CRT2DisplayFlag -> DisableCRT2Display ModeInfoFlag -> ModeTypeMask Support16Bpp -> Mode16Bpp Support32Bpp -> Mode32Bpp SupportHiVisionTV -> SupportHiVision SupportYPbPr -> SupportYPbPr750p SwitchToCRT2 -> SwitchCRT2 VB_XGI301 -> VB_SIS301 VB_XGI301B -> VB_SIS301B VB_XGI301LV -> VB_SIS301LV VB_XGI302B -> VB_SIS302B VB_XGI302LV -> VB_SIS302LV VB_YPbPr525p -> YPbPr525p VB_YPbPr750p -> YPbPr750p VCLK108_2 -> VCLK108_2_315 VCLK65 -> VCLK65_315 XGI_CRT2_PORT_04 -> SIS_CRT2_PORT_04 XGI_CRT2_PORT_10 -> SIS_CRT2_PORT_10 XGI_CRT2_PORT_12 -> SIS_CRT2_PORT_12 XGI_CRT2_PORT_14 -> SIS_CRT2_PORT_14 Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10staging/xgifb: Rename Set* defines and remove duplicated definesPeter Huewe3-134/+124
This patch renames the Set* defines and their usage to the naming convention of the sis initdef.h and removes the now duplicated defines. Renames: SetCRT2ToHiVisionTV -> SetCRT2ToHiVision SetCRT2ToYPbPr -> SetCRT2ToYPbPr525750 SetNTSCJ -> TVSetNTSCJ SetPALMTV -> TVSetPALM SetPALNTV -> TVSetPALN SetPALTV -> TVSetPAL SetYPbPrMode1080i -> TVSetHiVision SetYPbPrMode525i -> TVSetYPbPr525i SetYPbPrMode525p -> TVSetYPbPr525p SetYPbPrMode750p -> TVSetYPbPr750p Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10staging/xgifb: Rename panel defines and remove duplicated definesPeter Huewe3-141/+134
This patch renames the Panel* defines and their usage to the naming convention of the sis initdef.h and removes the now duplicated defines. Renames: Panel320x480 -> Panel_320x480 Panel800x600 -> Panel_800x600 Panel1024x768 -> Panel_1024x768 Panel1024x768x75 -> Panel_1024x768x75 Panel1280x1024 -> Panel_1280x1024 Panel1280x1024x75 -> Panel_1280x1024x75 Panel1280x960 -> Panel_1280x960 Panel1400x1050 -> Panel_1400x1050 Panel1600x1200 -> Panel_1600x1200 Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10staging/xgifb: Include sis initdef.h headerPeter Huewe1-2/+3
This patch includes the initdef.h header from the sis driver. Since the xgi driver used to redefine a lot of stuff from the sis driver, we can simply include the headers of the sis driver itself, so we can remove duplicated stuff later on. In order to include the initdef.h we have to rename the header guards. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09staging: xgifb: checkpatch cleanup printk() -> pr_lvl()Sam Hansen1-45/+43
Rewrote code to use pr_lvl() instead of printk(). There are still a few instances of printk(), mainly in the debug code which looks like it's going to be dropped/rewrote (most of it is blocked out). Signed-off-by: Sam Hansen <solid.se7en@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09staging: xgifb: checkpatch cleanup __func__Sam Hansen1-1/+1
Replaced an instance of __FUNCTION__ with __func__ in XGI_main_26.c. Signed-off-by: Sam Hansen <solid.se7en@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09staging: xgifb: checkpatch cleanup bracesSam Hansen1-7/+3
Cleaned up XGI_main_26.c and removed some unneeded braces to keep with code conventions. Signed-off-by: Sam Hansen <solid.se7en@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09staging: xgifb: pr_fmt kbuild macroSam Hansen1-0/+2
Added the kbuild macro pr_fmt() to XGI_main_26.c Signed-off-by: Sam Hansen <solid.se7en@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09staging/xgifb: Remove remaining duplicate structs and definesPeter Huewe2-133/+10
This patch removes the now unused structs and defines which were mere duplicates of the ones in the sgi headers Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09staging/xgifb: Use structs and defines from the sis headersPeter Huewe4-66/+66
This patch removes the usage of some xgi structs and defines and replaces them with the _identical_ structs from the sis headers. Thus the old structs and defines can be removed. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09staging/xgifb: Include sis headersPeter Huewe5-2/+13
This patch includes the headers of the sis driver and reorders some includes. Since the xgi driver used to redefine a lot of stuff from the sis driver, we can simply include the headers of the sis driver itself, so we can remove duplicated stuff later on. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09staging/xgifb: Remove unsupported mode LCD_320x480Peter Huewe1-10/+0
This patch removes the probed mode LCD_320x480 which isn't supported anyway since this mode falls through to the default (=invalid) mode in the XGIfb_validate_mode function (see line 529 ff. for details. the commented out code for this mode is also removed). By removing this assignment, we can use the LCD_TYPEs from the sis driver without modifications. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2011-12-08staging: xgifb: enable forcecrt2type as a module parameterAaro Koskinen1-0/+8
Enable forcecrt2type as a module parameter. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: enable forcecrt2type on XG21Aaro Koskinen3-12/+25
Make "forcecrt2type" to apply also for XG21. The patch enables user to switch LVDS LCD ON/OFF without the need to update the video BIOS. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: delete "userom" optionAaro Koskinen2-3/+0
Delete a redundant option. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: vb_table: delete XGI21_LCDCapListAaro Koskinen1-27/+0
Delete XGI21_LCDCapList. This data is display specific and does not belong to the driver. It should be provided by the video BIOS. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: move XGI21_LVDSCapStruct into xgifb_video_infoAaro Koskinen6-97/+86
Move the LVDS data into a device-specific data, and eliminate the global variable usage. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: disable LVDS on XG27Aaro Koskinen1-1/+0
XG27 has the second display output already hardcoded to disabled. Just in case, ensure that it has the LVDS code paths disabled. This will simplify the future cleanups. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: delete XGIfb_GetXG21LVDSData()Aaro Koskinen1-63/+0
Delete XGIfb_GetXG21LVDSData() and code which duplicates xgifb_read_vbios(). Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: ReadVBIOSTablData(): rename to xgifb_read_vbios()Aaro Koskinen1-3/+2
Rename the function to xgifb_read_vbios(). Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: ReadVBIOSTablData(): copy only a single LVDS entryAaro Koskinen2-32/+27
Only a single LVDS table entry is needed by the driver. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: ReadVBIOSTablData(): check the BIOS sizeAaro Koskinen1-7/+21
Check the BIOS size to avoid out of bounds array access. Disable LVDS in case errors are detected. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: use u8 for video BIOS dataAaro Koskinen1-3/+3
Use u8 for video BIOS data. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: delete pjVirtualRomBaseAaro Koskinen1-2/+0
Delete a redundant struct member. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: delete ROMAddrAaro Koskinen4-14/+0
Delete a redundant struct member. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: move video BIOS handling completely to ReadVBIOSTablData()Aaro Koskinen2-44/+39
We need the video BIOS only on XG21 and only during the init, so let's do everything at the same place. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: XGINew_GetXG21Sense(): eliminate video BIOS accessAaro Koskinen1-6/+1
Remove video BIOS access from the routine, use the flag instead which is initialized according to the BIOS data. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: ReadVBIOSTablData(): use a pointer to access the arrayAaro Koskinen1-26/+19
Use a pointer variable to make some lines shorter and more readable. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: ReadVBIOSTablData(): rename pVideoMemoryAaro Koskinen1-29/+20
Rename pVideoMemory to vbios, and also remove volatile at the same go. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: ReadVBIOSTablData(): use ARRAY_SIZEAaro Koskinen1-3/+1
Use ARRAY_SIZE. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: ReadVBIOSTablData(): rearrange code to avoid nestingAaro Koskinen1-60/+51
Rearrange code to avoid deep nesting. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08staging: xgifb: ReadVBIOSTablData(): avoid duplicating codeAaro Koskinen1-70/+27
If the count (j) is 0xff, just do the loop once. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28staging: xgifb: vb_setmode: clean up a single statement ifAaro Koskinen1-2/+1
Eliminate the only remaining checkpatch.pl warning: WARNING: braces {} are not necessary for single statement blocks #7463: FILE: staging/xgifb/vb_setmode.c:7463: + if (ModeNo & 0x80) { + ModeNo = ModeNo & 0x7F; + } total: 0 errors, 1 warnings, 0 checks, 7554 lines checked Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28staging: xgifb: vb_setmode: reduce if nesting in XGI_GetVCLK2Ptr()Aaro Koskinen1-66/+44
Eliminate unnecessary nesting levels by rearranging code and conditions. The resulting code should be still identical. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28staging: xgifb: vb_setmode: reduce if nesting in XGI_SetLockRegs()Aaro Koskinen1-29/+16
Eliminate unnecessary nesting levels by rearranging code and conditions. The resulting code should be still identical. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28staging: xgifb: vb_setmode: delete empty if statement blocksAaro Koskinen1-4/+1
Delete empty if statement blocks. The patch eliminates following checkpatch.pl warnings: WARNING: suspect code indent for conditional statements (8, 8) Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28staging: xgifb: vb_setmode: delete XGI_VBLongWait()Aaro Koskinen1-38/+0
XGI_VBLongWait() is NOP, so just delete it. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28staging: xgifb: vb_setmode: delete commented-out codeAaro Koskinen1-295/+5
Delete commented-out code. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28staging: xgifb: vb_setmode: inline XGI_SetMiscRegs()Aaro Koskinen1-23/+1
Inline a trivial function. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28staging: xgifb: vb_setmode: eliminate GetVGAType/Set_VGATypeAaro Koskinen2-18/+3
Eliminate unneeded function and struct field. The same information is available in HwDeviceExtension->jChipType. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28staging: xgifb: vb_setmode: make internal functions staticAaro Koskinen2-40/+11
Make internal functions static. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28staging: xgifb: vb_setmode: make XGI_GetLVDSOEMTableIndex() staticAaro Koskinen2-13/+11
XGI_GetLVDSOEMTableIndex() can be made static. Move the function, so that forward declaration is not needed. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28staging: xgifb: vb_setmode: make XGI_XG21SetPanelDelay() staticAaro Koskinen2-31/+29
XGI_XG21SetPanelDelay() can be made static. Move the function, so that forward declaration is not needed. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28staging: xgifb: vb_setmode: make XGI_XG27BLSignalVDD() staticAaro Koskinen2-34/+31
XGI_XG27BLSignalVDD() can be made static. Move the function, so that forward declaration is not needed. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28staging: xgifb: vb_setmode: make XGI_XG21BLSignalVDD() staticAaro Koskinen2-38/+35
XGI_XG21BLSignalVDD() can be made static. Move the function, so that forward declaration is not needed. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-28staging: xgifb: vb_setmode: make XGI_SetXG27FPBits() staticAaro Koskinen2-15/+14
XGI_SetXG27FPBits() can be made static. Move the function, so that forward declaration is not needed. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>