1
0
Fork 0
Commit Graph

39 Commits (eb37c56361df4a3e9705e808ce3f3bb483da3814)

Author SHA1 Message Date
Rehas Sachdeva c7437f342d staging: xgifb: Avoid multiple blank lines
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>
2016-03-11 22:09:09 -08:00
Sarah Khan 85ebbcca8a staging: xgifb: Removed a definition which was not used in driver
This patch removes a definition that was not used in driver xgifb

Signed-off-by: Sarah Khan <sarahjmi07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 16:10:38 -08:00
Lubomir Rintel 51c4491457 staging: xgifb: Drop some more useless defines
SetLCDStdMode is not supported as of 34c13ee2b6 ("staging: xgifb: drop
code for legacy VGA modes").

DisableLCD24bpp defined to zero was never realy useful and went away with
aa56b2790a ("staging: xgifb: vb_table: delete XGI21_LCDCapList").

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 10:03:31 -07:00
Tomi Valkeinen f7018c2135 video: move fbdev to drivers/video/fbdev
The drivers/video directory is a mess. It contains generic video related
files, directories for backlight, console, linux logo, lots of fbdev
device drivers, fbdev framework files.

Make some order into the chaos by creating drivers/video/fbdev
directory, and move all fbdev related files there.

No functionality is changed, although I guess it is possible that some
subtle Makefile build order related issue could be created by this
patch.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Rob Clark <robdclark@gmail.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-04-17 08:10:19 +03:00
Aaro Koskinen a2526d1f32 staging: xgifb: SetFlag: delete EnableChA
This flag is never set, so checks can be removed and code behind it
deleted.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30 20:55:51 +09:00
Aaro Koskinen d1724637e1 staging: xgifb: SetFlag: delete DisableChA
This flag is never set, so checks can be removed and code behind it
deleted.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30 20:55:51 +09:00
Aaro Koskinen b8e34b3ffa staging: xgifb: SetFlag: delete EnableChB
This flag is never set, so checks can be removed and code behind it
deleted.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30 20:55:51 +09:00
Aaro Koskinen c4f9c31ebe staging: xgifb: SetFlag: delete DisableChB
This flag is never set, so checks can be removed and code behind it
deleted.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30 20:55:50 +09:00
Aaro Koskinen ae424a3d6e staging: xgifb: SetFlag: delete GatingCRT
This flag is never set, so checks can be removed and code behind it
deleted.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30 20:55:49 +09:00
Aaro Koskinen 625030e5bf staging: xgifb: delete LCD_SetFlag
Delete redundant XGI330_LCDCapStruct field.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-28 16:10:15 -07:00
Aaro Koskinen ea12b4e077 staging: xgifb: eliminate pVBInfo->AGPReg
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-13 12:54:30 -08:00
Aaro Koskinen 5ce24760f6 staging: xgifb: eliminate pVBInfo->CR6B
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-13 12:54:30 -08:00
Aaro Koskinen 38c09652a0 staging: xgifb: eliminate pVBInfo->SR21/22/25
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>
2012-11-13 12:54:29 -08:00
Aaro Koskinen acfe093e82 staging: xgifb: eliminate pVBInfo->VCLKData/VBVCLKData
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-13 12:54:20 -08:00
Aaro Koskinen 9b04745816 staging: xgifb: eliminate pVBInfo->ECLKData
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-13 12:54:20 -08:00
Aaro Koskinen 7853bced96 staging: xgifb: eliminate pVBInfo->XGINEWUB_CRT1Table
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-13 12:54:20 -08:00
Aaro Koskinen a39325d24f staging: xgifb: eliminate pVBInfo->RefIndex
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-13 12:54:20 -08:00
Aaro Koskinen b397992e88 staging: xgifb: eliminate pVBInfo->EModeIDTable
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-13 12:54:19 -08:00
Aaro Koskinen 898df16401 staging: xgifb: delete LCDLenList
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-10 15:48:17 -07:00
Aaro Koskinen c62c517e51 staging: xgifb: delete some unused #defines
Delete some unused #defines.

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 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 c3b3b3f9b0 staging/xgifb: remove remaining duplicate initdef.h defines
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-10 09:56:25 -08:00
Peter Huewe ccc8cb25ae staging/xgifb: Use TVCLKBASE_315 as a base address
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-10 09:56:24 -08: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 599801f926 staging/xgifb: Rename Set* defines and remove duplicated defines
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-10 09:56:23 -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 84359ef62a staging/xgifb: Include sis initdef.h header
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-10 09:56:21 -08:00
Aaro Koskinen 09cb8e509b staging: xgifb: delete Win9xDOSMode
Delete another useless flag.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:14 -07:00
Aaro Koskinen d2de85c5da staging: xgifb: delete IF_DEF_VideoCapture
Delete already disabled code paths.

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 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 a35cd0ba7f staging: xgifb: delete support for Chrontel 7017 TV output
IF_DEF_CH7017 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:06 -07:00
Aaro Koskinen fa4c212f2b staging: xgifb: delete unused definitions
Delete some more unused definitions.

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:45 -07:00
Aaro Koskinen 1f8385841b staging: xgifb: delete duplicate #defines
Delete duplicate identical #defines.

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:45 -07:00
Aaro Koskinen 5c167b30c1 staging: xgifb: eliminate #ifdef NewScratch
NewScratch is always defined so all checks can be eliminated.

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:45 -07:00
Kenji Toyama 661f659e11 Staging: xgifb: Fixed coding style issues in vb_def.h
I've removed all the warnings given by checkpatch.pl in vb_def.h and
also changed the indentation of pretty much the entire file so that it
is more consistent.

Signed-off-by: Daniel Kenji Toyama <kenji.toyama@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 17:28:11 -07:00
Bill Pemberton f2f58e14ef Staging: xgifb: Remove use of LINUX_KERNEL define
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:20:44 -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