summaryrefslogtreecommitdiffstats
path: root/drivers/staging/xgifb
AgeCommit message (Collapse)Author
2016-03-11Staging: xgifb: remove useless blank linesBen Marsh
This is a patch to XGI_main_26.c that removes useless blanklines as flagged by checkpatch.pl Signed-off-by: Ben Marsh <bmarsh94@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: xgifb: Avoid multiple blank linesRehas Sachdeva
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-02-14staging: xgifb: Fix comment styleJanani Ravichandran
Fix comments to use trailing */ on separate lines. Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: xgifb: Remove unneeded parenthesesJanani Ravichandran
Remove unneeded parentheses around the right hand side of assignments as they are not needed. Semantic patch: @@ expression a, b, c; @@ ( a = (b == c) | a = - ( b - ) ) Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11Staging: xgifb: Remove unnecessary blank linesBhumika Goyal
This patch removes unnecessary blank lines after { and before }. Found using checkpatch.pl. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11Staging: xgifb: Remove space after type castBhumika Goyal
This patch removes unnecessary space after type casts. Found using checkpatch.pl. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07drivers: staging: xgifb: vgatypes.h: fixed coding style warningsSaatvik Arya
fixed warnings about comment block coding style Signed-off-by: Saatvik Arya <aryasaatvik@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: xgifb: Don't use multiple blank linesBenoit Hiller
Remove multiple blank lines. Problem found using checkpatch.pl "CHECK: Please don't use multiple blank lines" Signed-off-by: Benoit Hiller <benoit.hiller@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24Staging: xgifb: Remove space after castNavya Sri Nizamkari
This patch fixes the checkpatch check: CHECK: No space is necessary after a cast Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24Staging: xgifb: Fix comparison to NULL warningNavya Sri Nizamkari
Change comparison to NULL to a ! operation. Found using checkpatch. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24Staging: xgifb: Remove extra blank lines.Navya Sri Nizamkari
This patch fixes the checkpatch.pl check: CHECK: Please don't use multiple blank lines Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24Staging: xgifb: Remove blank line before } and after {Navya Sri Nizamkari
Remove blank line after { and before }. Problem found using checkpatch. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24Staging: xgifb: Replace udelay, mdelay functions with usleep_rangeNavya Sri Nizamkari
This patch fixes the checkpatch.pl check: CHECK: usleep_range is preferred over udelay. Replace mdelay with usleep_range function too. Add 1 millisecond to the delay time to get a reasonable upper limit which saves one wakeup call. Do same throughout the file. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: xgifb: make XGIfb_has_VB return booleanGeliang Tang
This patch makes XGIfb_has_VB return boolean, since this function only uses either one or zero as its return value. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02Staging: xgifb: vb_util: Fixed sparse warning of bit truncation due to castShivani Bhardwaj
Fixed the warning generated by sparse that 'cast truncates bits from constant value' by typecasting unsigned values to u8 as their logical operation is being performed with and stored in a u8 type variable. Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14staging: xgifb: Remove unnecessary externsJoe Perches
Using 'extern' is not necessary for function prototypes. Miscellanea: o Reflow alignments Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31staging/xgifb: fix dumpVGAReg compile error if DEBUG is setPeter Huewe
If DEBUG is set dumpVGAReg is called and tries to access XGISR which is defined as (xgifb_info->dev_info.P3c4) which is not known within this function. -> add as parameter to dumpVGAReg so xgifb_info becomes known Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14staging/xgifb: Move register helper functions to headerPeter Huewe
and mark them as static inline. This shrinks the compiled module from 137442 to 117732 bytes and we also get rid of vb_util.c Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14staging: xgifb: prefer using the BIT macroHari Prasath Gujulan Elango
This patch uses the BIT macro for bit shift operation. Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31staging: xgifb: use arch_phys_wc_add() and ioremap_wc()Luis R. Rodriguez
The same area used for ioremap() is used for the MTRR area. Convert the driver from using the x86 specific MTRR code to the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add() will avoid MTRR if write-combining is available, in order to take advantage of that also ensure the ioremap'd area is requested as write-combining. There are a few motivations for this: a) Take advantage of PAT when available b) Help bury MTRR code away, MTRR is architecture specific and on x86 its replaced by PAT c) Help with the goal of eventually using _PAGE_CACHE_UC over _PAGE_CACHE_UC_MINUS on x86 on ioremap_nocache() (see commit de33c442e titled "x86 PAT: fix performance drop for glx, use UC minus for ioremap(), ioremap_nocache() and pci_mmap_page_range()") The conversion done is expressed by the following Coccinelle SmPL patch, it additionally required manual intervention to address all the #ifdery and removal of redundant things which arch_phys_wc_add() already addresses such as verbose message about when MTRR fails and doing nothing when we didn't get an MTRR. @ mtrr_found @ expression index, base, size; @@ -index = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1); +index = arch_phys_wc_add(base, size); @ mtrr_rm depends on mtrr_found @ expression mtrr_found.index, mtrr_found.base, mtrr_found.size; @@ -mtrr_del(index, base, size); +arch_phys_wc_del(index); @ mtrr_rm_zero_arg depends on mtrr_found @ expression mtrr_found.index; @@ -mtrr_del(index, 0, 0); +arch_phys_wc_del(index); @ mtrr_rm_fb_info depends on mtrr_found @ struct fb_info *info; expression mtrr_found.index; @@ -mtrr_del(index, info->fix.smem_start, info->fix.smem_len); +arch_phys_wc_del(index); @ ioremap_replace_nocache depends on mtrr_found @ struct fb_info *info; expression base, size; @@ -info->screen_base = ioremap_nocache(base, size); +info->screen_base = ioremap_wc(base, size); @ ioremap_replace_default depends on mtrr_found @ struct fb_info *info; expression base, size; @@ -info->screen_base = ioremap(base, size); +info->screen_base = ioremap_wc(base, size); Generated-by: Coccinelle SmPL Cc: Arnaud Patard <arnaud.patard@rtp-net.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Aaro Koskinen <aaro.koskinen@iki.fi> Cc: Brian Vandre <bvandre@gmail.com> Cc: Thomas Gummerer <t.gummerer@gmail.com> Cc: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Cc: Lubomir Rintel <lkundrak@v3.sk> Cc: Vitor Braga <vitorpybraga@gmail.com> Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: Suresh Siddha <sbsiddha@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Juergen Gross <jgross@suse.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Dave Airlie <airlied@redhat.com> Cc: Antonino Daplas <adaplas@gmail.com> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: devel@driverdev.osuosl.org Cc: linux-fbdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31staging: xgifb: use swap() in XGI_WriteDAC()Fabian Frederick
Use kernel.h macro definition. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31Staging: xgifb: vb_setmode: Fixed spelling errorColin Cronin
Fixed spelling error in comment. Signed-off-by: Colin Cronin <colinpatrickcronin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06staging: xgifb: remove extra parentheses around right bit shift operationsAya Mahfouz
Removes extra parentheses around bitwise right shift operations. The cases handled here are when resultant values are assigned to variables. The issue was detected and resolved using the following coccinelle script: @@ expression e, e1; constant c; @@ e = -(e1 +e1 >> -c); +c; @@ identifier i; constant c; type t; expression e; @@ t i = -(e +e >> -c); +c; @@ expression e, e1; identifier f; constant c; @@ e1 = f(..., -(e +e >> -c) +c ,...); Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26staging: xgifb: rewrite the right hand side of an assignmentAya Mahfouz
This patch rewrites the right hand side of an assignment for expressions of the form: a = (a <op> b); to be: a <op>= b; where <op> = << | >>. This issue was detected and resolved using the following coccinelle script: @@ identifier i; expression e; @@ -i = (i >> e); +i >>= e; @@ identifier i; expression e; @@ -i = (i << e); +i <<= e; Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07staging: xgifb: fix colours on big-endian machines other than powerpcAaro Koskinen
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 Mukherjee
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 Khan
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 Vandre
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 Ye
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 Khan
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 Gummerer
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 Hazarey
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 Rintel
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 Rintel
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 Rintel
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 Rintel
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 Braga
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 Valkeinen
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 Agarwal
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 Han
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 Akagunduz
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 Varatharaj
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 Akagunduz
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 Kamat
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 Gaurav
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 Koskinen
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 Koskinen
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 Koskinen
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 Koskinen
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 Koskinen
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>