aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/xgifb (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-02-07staging: xgifb: fix colours on big-endian machines other than powerpcAaro Koskinen1-4/+4
XGI framebuffer supports big-endian machines, but it's currently enabled based on __powerpc__ define (which is wrong, as powerpc can be also little-endian now). Use __BIG_ENDIAN instead. This will fix wrong colours on such machines. Tested on parisc with XGI Z7. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17staging: xgifb: remove unnecessary checkSudip Mukherjee1-1/+1
the check for htotal and vtotal is not required as we have already checked for them and returned -EINVAL if any of them is zero. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03staging: xgifb: Removed a definition which was not used in driverSarah Khan1-1/+0
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-10-29Staging: xgifb: fix space before commaBrian Vandre1-1/+1
This fixes the checkpatch.pl error: ERROR: space prohibited before that ',' Signed-off-by: Brian Vandre <bvandre@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27staging: remove unneeded parentheses around the right hand side of an assignmentJiayi Ye1-1/+1
In assignments such as value = (FLASH_CMD_STATUS_REG_READ << 24);, parentheses are not needed. The Coccinelle semantic patch was used to find cases. @r@ identifier x; expression e1, e2; @@ - x = (e1 << e2); + x = e1 << e2; Signed-off-by: Jiayi Ye <yejiayily@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27staging: xgifb: Removed an unnecessary assignment statementSarah Khan1-4/+1
Used coccinelle patch @@ expression data; identifier f; @@ -data = +return f(...); -return (data); Signed-off-by: Sarah Khan <sarahjmi07@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-06staging: xgifb: remove unnecessary elseThomas Gummerer3-37/+26
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24Staging: xgifb: Fixed a code-style warningChaitanya Hazarey1-0/+1
Added a blank line after declarations to fix the following warning issued by checkpatch.pl: drivers/staging/xgifb/vb_init.c:800: WARNING: Missing a blank line after declarations Signed-off-by: Chaitanya Hazarey <c@24.io> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18staging: xgifb: Update TODOLubomir Rintel1-2/+1
There's no more printk abuse, it's been sorted out in 448810662ac3 ("Staging: xgifb: Remove printk usage.") Extra ifdefs have been fixed too, mostly in 800d67cf9f77 ("staging: xgifb: eliminate #ifdef Tap4"), c39aada6926c ("staging: xgifb: eliminate #ifdef XGIFB_PAN"), fa4c212f2b81 ("staging: xgifb: delete unused definitions"), 5c167b30c1b4 ("staging: xgifb: eliminate #ifdef NewScratch"), f059077388b0 ("Staging: xgifb: Remove #ifdef MODULE") and more. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18staging: xgifb: Drop some more useless definesLubomir Rintel1-2/+0
SetLCDStdMode is not supported as of 34c13ee2b690 ("staging: xgifb: drop code for legacy VGA modes"). DisableLCD24bpp defined to zero was never realy useful and went away with aa56b2790a8b ("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-18staging: xgifb: Initialize Part0PortLubomir Rintel1-0/+1
It was left uninitialized, likely overseen, in this commit: 56810a92c689c6 ("staging: xgifb: use XGIRegInit() Avoid copy-paste and use XGIRegInit() to initialize registers addresses.") Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18staging: xgifb: Eliminate useless ifndefsLubomir Rintel2-6/+0
XGI_VB_CHIP_TYPE, PCI_DEVICE_ID_XGI_42 and PCI_DEVICE_ID_XGI_27 are never defined. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-25staging: xgifb coding style cleanupVitor Braga3-0/+6
This fixes "missing a blank line after declaration" warnings from checkpatch.pl for driver xgifb. The driver has no remaining errors or warnings from checkpatch.pl Signed-off-by: Vitor Braga <vitorpybraga@gmail.com> Reviewed-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-17video: move fbdev to drivers/video/fbdevTomi Valkeinen3-4/+4
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-02-28Staging: xgifb: Fix quoted string split across lines in XGI_main_26.cMonam Agarwal1-10/+5
This patch fixes the following checkpatch.pl issues in XGI_main_26.c: WARNING: Quoted string split across lines Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-02staging: remove DEFINE_PCI_DEVICE_TABLE macroJingoo Han1-1/+1
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro is not preferred. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-30Staging: xgifb: fix braces {} are not necessary for any arm of this statementEbru Akagunduz1-3/+2
Fix checkpatch.pl issues with braces {} are not necessary for any arm of this statement in vb_setmode.c Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14Staging: xgifb: remove space before semicolonAshvini Varatharaj1-1/+1
Fix checkpatch warning: WARNING:space prohibited before semicolon Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-07Staging: xgifb: braces {} are not necessary for single statement in vb_setmodeEbru Akagunduz1-4/+2
Fix checkpatch.pl issues with braces {} are not necessary for single statement blocks in vb_setmode.c Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25staging: xgifb: Remove redundant pci_set_drvdataSachin Kamat1-1/+0
Driver core sets driver data to NULL upon failure or remove. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-12Staging: xgifb: Fixed a warning of Space before semicolonKumar Gaurav1-1/+1
Fixed issue by removing Space before semicolon Signed-off-by: Kumar Gaurav <kumargauravgupta3@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: xgifb: delete unused "pVBInfo" parametersAaro Koskinen4-22/+15
Delete unused "pVBInfo" parameters from internal functions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: xgifb: delete unused "RefreshRateTableIndex" parametersAaro Koskinen1-27/+17
Delete unused "RefreshRateTableIndex" parameters from internal functions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: xgifb: delete unused "HwDeviceExtension" parametersAaro Koskinen3-76/+39
Delete unused "HwDeviceExtension" parameters from internal functions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: xgifb: delete unused "ModeIdIndex" parametersAaro Koskinen1-23/+14
Delete unused "ModeIdIndex" parameters from internal functions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: xgifb: delete unused "ModeNo" parametersAaro Koskinen1-134/+107
Delete unused "ModeNo" parameters from internal functions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: xgifb: delete unused "rateindex" parametersAaro Koskinen1-5/+3
Delete unused "rateindex" parameters from internal functions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: vb_setmode: delete IF_DEF_CRT2Monitor checksAaro Koskinen1-14/+5
Code checking for IF_DEF_CRT2Monitor is only executed for chips < XG20, and there IF_DEF_CRT2Monitor is always true, so the flag is redundant. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: vb_setmode: delete IF_DEF_HiVision checksAaro Koskinen1-25/+14
Code checking for IF_DEF_HiVision is only executed for chips < XG20, and there IF_DEF_HiVision is always true, so the flag is redundant. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: vb_setmode: delete IF_DEF_YPbPr checksAaro Koskinen1-41/+26
Code checking for IF_DEF_YPbPr is only executed for chips < XG20, and there IF_DEF_YPbPr is always true, so the flag is redundant. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: delete redundant return statementsAaro Koskinen1-14/+1
Delete redundant return statements at the end of void functions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: XGI_DisableBridge(): delete redundant checksAaro Koskinen1-11/+4
Delete some redudant checks. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: XGI_EnableChISLCD(): delete trivial functionAaro Koskinen1-28/+5
The function returns always false, delete it. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: SetFlag: delete EnableChAAaro Koskinen2-19/+3
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-30staging: xgifb: SetFlag: delete DisableChAAaro Koskinen2-25/+11
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-30staging: xgifb: SetFlag: delete EnableChBAaro Koskinen2-15/+4
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-30staging: xgifb: SetFlag: delete DisableChBAaro Koskinen2-34/+19
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-30staging: xgifb: SetFlag: delete GatingCRTAaro Koskinen2-17/+3
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-30staging: xgifb: XGI_SetCRT1VCLK(): avoid copy-pasteAaro Koskinen1-10/+4
Avoid copy-pasted code in if branches by rearranging the checks. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: XGI_GetRatePtrCRT2(): delete IF_DEF_LVDS checkAaro Koskinen1-8/+3
IF_DEF_LVDS cannot be set if ProgrammingCRT2 flag is set, so remove the check to simplify the code. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: XGI_AjustCRT2Rate(): delete IF_DEF_LVDS checkAaro Koskinen1-55/+34
IF_DEF_LVDS cannot be set when XGI_AjustCRT2Rate() is called, so we can remove the check and dead code. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: call XGI_GetVBType from InitTo330PointerAaro Koskinen2-7/+3
Move XGI_GetVBType call inside InitTo330Pointer to avoid code duplication. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: XGI_GetVBType(): delete IF_DEF_LVDS checkAaro Koskinen1-3/+0
XGI_GetVBType() is called only for chips < XG20 so IF_DEF_LVDS cannot be set. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: refactor XGI_BridgeIsOn()Aaro Koskinen3-17/+9
Refactor XGI_BridgeIsOn(). IF_DEF_LVDS bit is not valid for < XG20 chips. Also we can make the function static by moving it to vb_init. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-17staging/xgifb: Remove dead assignments/incrementsPeter Huewe2-20/+1
The code now contains several dead assignments which are shadowed by another assignment a few lines later. -> This patch removes them (and possibly associated code). Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging/xgifb: Fix always false condition in vb_setmode.c (smatch)Peter Huewe1-1/+1
Smatch complains: drivers/staging/xgifb/vb_setmode.c:3181 XGI_SetLockRegs() warn: bitwise AND condition is false here Since SetNTSCTV is defined as 0 in drivers/video/sis/initdef.h this is correct. -> Change the condition to == to fix this. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging/xgifb: Remove unnecessary binary calculation in GetXG27FPBitsPeter Huewe1-3/+1
If temp <= 2 no other bits than the lowest two (0x03) can be set anyway -> this operation can be removed. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging/xgifb: Consolidate function almost identical calls in XGINew_GetXG21SensePeter Huewe1-10/+4
Instead of calling xgifb_reg_and_or with almost identical parameters in a simple if/else scenario, we assign the changing parameter to a temp variable and call xgifb_reg_and_or only from one location. -> Easier to read, easier to understand (especially wrt the line breaks) (For the if condition we don't need the Temp variable, so we can use the value directly). Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging/xgifb: Remove unnecessary cases in XGINew_SenseLCDPeter Huewe1-36/+15
The switch statement sets the temp value to zero for certain cases and leaves it untouched for other cases -> all these other cases can be combined in the default case. Since an empty case containing only a break, it can be removed. The patch also removes the if statement, as it uses the same value as the switch for comparison, and includes the code into the switch. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging/xgifb: Remove uneccessary/simply if in XGINew_GetXG20DRAMTypePeter Huewe1-5/+3
Instead of storing the value in a temp variable, anding it with 1 and assign data conditionally we can assign the value directly. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>