dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

42 Commits

Author SHA1 Message Date
Aaro Koskinen 2457254560 staging: xgifb: use proper typing for TV data
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-10 15:48:16 -07:00
Aaro Koskinen 6265ee4c0b staging: xgifb: delete Chrontel TV data
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-10 15:48:16 -07:00
Aaro Koskinen 4c047ac461 staging: xgifb: avoid copy-pasting LCD data
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-09-10 15:48:16 -07:00
Miguel Gómez 3bcc246016 Staging: xgifb: Fix coding style.
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-11 16:59:32 -07:00
Miguel Gómez 949eb0aeb9 Staging: xgifb: Comment cleaning.
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-07-11 16:59:27 -07:00
Peter Huewe 6d12dae47e staging/xgifb: Cleanup vb_device_info struct
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>
2012-06-13 17:15:43 -07:00
Peter Huewe 51f984bc06 staging/xgifb: Use SiS structs
This patch replaces some of the XGI internal structs by their
counterparts in the SiS driver.
XGI330_LVDSDataStruct -> SiS_LVDSData
XGI330_LCDDataStruct -> SiS_LCDData
XGI330_CHTVDataStruct -> SiS_LVDSData

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:15:43 -07:00
Peter Huewe 03f76fc617 staging/xgifb: Replace delay lookup tables with constant values
For TV Devices:
The values taken from XGI_TVDelayList are always overwritten with the
values from XGI_TVDelayList2 since the if condition for using the values
from XGI_TVDelayList2 is identical with the check to enter this scope and
thus always true.
The delay values in XGI_TVDelayList2 is always 0x22 so we
can simply replace it with this constant value.

For LCD Devices:
The LCD_DelayCompensation field is always set to 0x12 so we can simply
replace this field with a constant value.

This saves about 500 bytes in compiled size.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:15:43 -07:00
Peter Huewe ac326fb96b staging/xgifb: Add header #include guards to vb_table.h
This patch adds a simple #include guard to vb_table.h

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:13:22 -07:00
Greg Kroah-Hartman d210267741 Merge 3.4-rc5 into staging-next
This resolves the conflict in:
	drivers/staging/vt6656/ioctl.c

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-02 11:48:07 -07:00
Aaro Koskinen d00d12f87a staging: xgifb: eliminate redundant struct definition
Replace XGI330_LCDDataDesStruct with identical XGI_LCDDesStruct.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10 10:20:09 -07:00
Aaro Koskinen 354f49fa12 staging: xgifb: delete VB_ExtTVEdgeIndex
Delete VB_ExtTVEdgeIndex. It's 0 for all video modes.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10 10:20:09 -07:00
Aaro Koskinen 36ae035b45 staging: xgifb: delete VB_ExtTVFlickerIndex
Delete VB_ExtTVFlickerIndex. It's 0 for all video modes.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10 10:20:08 -07:00
Aaro Koskinen 66f38592a0 staging: xgifb: XGI_ExtStruct: delete unused fields
Delete unused struct fields.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10 10:20:08 -07:00
Aaro Koskinen fb60d0c4f7 staging: xgifb: truncate XGI330_StandTable
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-10 10:20:08 -07:00
Aaro Koskinen 969f7f3b1d staging: xgifb: delete code for EGA or lower modes
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-10 10:20:08 -07:00
Aaro Koskinen ace1055e5e staging: xgifb: delete SModeIDTable
Delete unused data.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10 10:20:08 -07:00
Dmitry Eremin-Solenikov 6490311f42 staging/xgifb: fix display on XGI Volari Z11m cards
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-04-10 09:51:49 -07:00
Peter Huewe a3d675c88f staging/xgifb: Rename XGI specific initdef.h defines
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-10 09:56:24 -08:00
Peter Huewe 6896b94e24 staging/xgifb: Rename remaining sis initdef.h defines and remove duplicates
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-10 09:56:24 -08:00
Peter Huewe 255aabd2b8 staging/xgifb: Rename panel defines and remove duplicated defines
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-10 09:56:22 -08:00
Peter Huewe fc39dcb7fa staging/xgifb: Use structs and defines from the sis headers
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-09 09:21:56 -08:00
Aaro Koskinen aa56b2790a staging: xgifb: vb_table: delete XGI21_LCDCapList
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-08 12:26:08 -08:00
Aaro Koskinen 11fbdcde54 staging: xgifb: delete duplicated timing data
Delete redundant timing data tables. Replace as follows:

	EnlargeTap4Timing	==> xgifb_tap4_timing
	NoScaleTap4Timing	==> xgifb_tap4_timing
	NTSCTap4Timing		==> xgifb_ntsc_525_tap4_timing
	YPbPr525iTap4Timing	==> xgifb_ntsc_525_tap4_timing
	YPbPr525pTap4Timing	==> xgifb_ntsc_525_tap4_timing

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:13 -07:00
Aaro Koskinen 0c23b6d2fe staging: xgifb: delete duplicated TV data tables
Delete redundant TV data tables. Replace as follows:

	XGI_EPLCHTVDataPtr	==> xgifb_chrontel_tv
	XGI_EPLCHTVRegPtr	==> xgifb_chrontel_tv

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:13 -07:00
Aaro Koskinen cc5c2aeb23 staging: xgifb: delete duplicated LCD table
XGI_EPLLCDCRT1Ptr_H and XGI_EPLLCDCRT1Ptr_V tables are identical. Replace
as follows:

	XGI_EPLLCDCRT1Ptr_H	==> xgifb_epllcd_crt1
	XGI_EPLLCDCRT1Ptr_V	==> xgifb_epllcd_crt1

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:12 -07:00
Aaro Koskinen ada2bda145 staging: xgifb: delete duplicated LCD data
Delete duplicated LCD data tables. Replace as follows:

	XGI_ExtLCD1400x1050Data		==> xgifb_lcd_1400x1050
	XGI_StLCD1400x1050Data		==> xgifb_lcd_1400x1050
	XGI_ExtLCD1280x1024x75Data	==> xgifb_lcd_1280x1024x75
	XGI_StLCD1280x1024x75Data	==> xgifb_lcd_1280x1024x75
	XGI_ExtLCDDes1400x1050Data	==> xgifb_lcddes_1400x1050
	XGI_StLCDDes1400x1050Data	==> xgifb_lcddes_1400x1050
	XGI_ExtLCDDLDes1400x1050Data	==> xgifb_lcddldes_1400x1050
	XGI_StLCDDLDes1400x1050Data	==> xgifb_lcddldes_1400x1050
	XGI_ExtLCDDes1024x768x75Data	==> xgifb_lcddes_1024x768x75
	XGI_StLCDDes1024x768x75Data	==> xgifb_lcddes_1024x768x75
	XGI_ExtLCDDes1280x1024x75Data	==> xgifb_lcddes_1280x1024x75
	XGI_StLCDDes1280x1024x75Data	==> xgifb_lcddes_1280x1024x75
	XGI_ExtLCDDLDes1280x1024x75Data ==> xgifb_lcddldes_1280x1024x75
	XGI_StLCDDLDes1280x1024x75Data	==> xgifb_lcddldes_1280x1024x75

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:12 -07:00
Aaro Koskinen 2555e9458f staging: xgifb: delete duplicated YFilter1 data
PAL-M and PAL-N "YFilter1" tables are identical. Replace as follows:

	PALMYFilter1	==> xgifb_palmn_yfilter1
	PALNYFilter1	==> xgifb_palmn_yfilter1

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:11 -07:00
Aaro Koskinen 80f86f8f26 staging: xgifb: delete duplicated YFilter2 data
All four "YFilter2" tables are identical. Replace as follows:

	NTSCYFilter2	==> xgifb_yfilter2;
	PALMYFilter2	==> xgifb_yfilter2;
	PALNYFilter2	==> xgifb_yfilter2;
	PALYFilter2	==> xgifb_yfilter2;

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:10 -07:00
Aaro Koskinen 3825b38e59 staging: xgifb: do not initialize static data to 0
Remove redundant initializations.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:10 -07:00
Aaro Koskinen 800d67cf9f staging: xgifb: eliminate #ifdef Tap4
Eliminate #define Tap4 and related checks.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:09 -07:00
Aaro Koskinen 160b006ae9 staging: xgifb: delete redundant Chrontel TV data
Delete redundant Chrontel TV data.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:08 -07:00
Aaro Koskinen 83f76a9d7e staging: xgifb: delete support for Chrontel 7007 TV output
IF_DEF_CH7007 is hard-coded to 0, so this is all just dead code that
can be deleted.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:07 -07:00
Aaro Koskinen 3f1095328e staging: xgifb: vb_table: delete unused data
Delete unused data.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 14:21:46 -07:00
Kenji Toyama 3ecf352cfd Staging: xgifb: Removed thousands of warnings.
This is a big patch to remove all the warnings given by checkpatch.pl.
There were 13348 errors and  3112 warnings, but now there's nothing.
I've compiled the files dependent on this header and they seem alright.

Signed-off-by: Daniel Kenji Toyama <kenji.toyama@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 17:30:43 -07:00
Aaro Koskinen 0658733528 staging: xgifb: eliminate redudant chip type >= XG40 checks
Since all chips supported by the driver are >= XG40, these checks are
redundant and the code can be modified accordingly.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 11:52:26 -07:00
Randy Dunlap 8922967ea3 Staging: xgifb: fix lots of sparse warnings
Fix many sparse warnings about data or functions being static.
Fix many sparse warnings about data or functions not being used
  (put them inside #if 0/#endif blocks).
Fix sparse warnings about 0 being used for NULL.
Fixed a small bit of source formatting when those lines were being
  modified anyway, but there is still lots of this yet to be done.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: devel@driverdev.osuosl.org
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31 14:51:53 -07:00
Bill Pemberton 80adad85ea Staging: xgifb: Remove typedefs in vb_struct.h
This removes all the remaining typedefs in vb_struct.h

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:33:34 -07:00
Bill Pemberton 108afbf8ae Staging: xgifb: Remove SHORT, UCHAR, and LONG typedef
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:33:19 -07:00
Bill Pemberton 82d6eb5b2e Staging: xgifb: Remove USHORT, ULONG, BOOLEAN, and VOID typedefs
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:32:32 -07:00
Bill Pemberton 490ce818c6 Staging: xgifb: Remove unused code
Remove code that was removed using #if 0

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:30:54 -07:00
apatard@mandriva.com d7636e0b07 staging: Add framebuffer driver for XGI chipsets
This driver handles XG20, XG21, XG40, XG42 chipsets from XGI. They're
also known as Z7,Z9,Z11 chipsets. It's based on the SiS fb driver but
has been heavily modified by XGI to support their newer chipsets.


Signed-off-by: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:51 -07:00