summaryrefslogtreecommitdiffstats
path: root/drivers/staging/xgifb
AgeCommit message (Collapse)AuthorFilesLines
2012-04-10staging: xgifb: XGI_ExtStruct: delete unused fieldsAaro Koskinen2-135/+66
Delete unused struct fields. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: xgifb: delete legacy DAC dataAaro Koskinen1-84/+31
Delete DAC data for unsupported legacy modes. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: xgifb: delete StandTableIndex parametersAaro Koskinen1-10/+6
Delete unused function parameters. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: xgifb: truncate XGI330_StandTableAaro Koskinen2-449/+20
Only single element from XGI330_StandTable is used, so the array can be truncated. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: xgifb: delete code for EGA or lower modesAaro Koskinen2-45/+7
All supported modes have ModeType > 2. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: xgifb: delete SModeIDTableAaro Koskinen3-40/+0
Delete unused data. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: xgifb: drop code for legacy VGA modesAaro Koskinen1-893/+367
Drop code for mode_no <= 14. These are not supported so this is all just dead code. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: xgifb: unwrap mode table linesAaro Koskinen1-114/+57
Unwrap lines to improve readability. Comments were deleted as they were not really informative. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: xgifb: delete MD_XGI300Aaro Koskinen1-47/+46
Nobody cares about this bit. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: xgifb: delete mode rows and columnsAaro Koskinen1-59/+57
Delete redudant rows and columns data. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: xgifb: delete mode names from the mode tableAaro Koskinen1-59/+58
Delete mode names from the table. They are just redundant data. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: xgifb: drop redudant mode table entriesAaro Koskinen1-30/+1
Since the mode search is not string-based anymore, we can drop XxYx24 entries which were just duplicated XxYx32 entries. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: xgifb: eliminate string comparison from mode searchAaro Koskinen1-10/+17
Eliminate string comparison from the video mode search. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: xgifb: delete rate_idx from mode tableAaro Koskinen2-77/+74
The default rate_idx is same for all video modes, no need to keep that in the table. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: xgifb: delete XGI300paneltypeAaro Koskinen1-7/+0
Delete unused table. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: xgifb: drop XG45 codeAaro Koskinen2-12/+0
XG45 is not recognized/supported by the driver. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: xgifb: drop XG41 codeAaro Koskinen4-82/+1
XG_41 is not listed in xgifb_pci_table, so the code can be safely dropped. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: xgifb: XGIfb_mode_rate_to_dclock: initialize ModeIdIndex properlyAaro Koskinen1-0/+2
Initialize ModeIdIndex according to the selected video mode. Currently index 0 is always used and wrong clock data may be used. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: xgifb: XGIfb_mode_rate_to_dclock: delete commented-out codeAaro Koskinen1-13/+0
Delete code that has been commented out. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: xgifb: XGIfb_mode_rate_to_ddata: initialize ModeIdIndex properlyAaro Koskinen1-1/+3
Initialize ModeIdIndex according to the selected video mode. Currently index 0 is always used and wrong video mode data may be used. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging: xgifb: XGIfb_mode_rate_to_ddata: delete commented-out codeAaro Koskinen1-14/+0
Delete code that has been commented out. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging/xgifb: fix addressing issues on platform with long physical addressingDmitry Eremin-Solenikov2-8/+8
Some platforms (e.g. ppc460ex) have 36-bit physical addressing, while sizeof(unsigned long) == 4. Adapt xgifb driver to use phys_addr_t for physical address variables instead of unsigned long. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging/xgifb: simplify vga I/O ports handlingDmitry Eremin-Solenikov4-5/+3
XGIfb driver transfers integer port number through several typecasts via pjIOAddress field. Drop that field completely and use vga_base field of xgifb_info directly. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging/xgifb: drop RelIO from vb_device_infoDmitry Eremin-Solenikov2-5/+1
The RelIO field is unused in the driver, drop it. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10staging/xgifb: remove unused variableDmitry Eremin-Solenikov1-1/+1
In function XGIfb_do_set_var() remove unused variable sr_data. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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>