summaryrefslogtreecommitdiffstats
path: root/drivers/staging/xgifb
Commit message (Collapse)AuthorAgeFilesLines
* staging: xgifb: Remove unused variable and if statementRehas Sachdeva2016-09-221-5/+1
| | | | | | | | | | | | | | | | | | | | | | | Setting the variable 'refresh_rate = 60;' has no use to the rest of the function. Hence the if statement setting it and the variable itself can be removed. This was detected using the following Coccinelle semantic patch: @@ type T; identifier i; constant C; @@ ( extern T i; | - T i; <+... when != i - i = C; ...+> ) Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: xgifb: Compress return logicBhumika Goyal2016-09-181-4/+1
| | | | | | | | | | | | | | | | | | | This patch compresses the return logic into a single statement and removes the now unused return variable. Done using coccinelle: @@ type T; identifier r; @@ - T r; ... when !=r - r = + return ...; - return r; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: Replace explicit NULL comparisonNamrata A Shettar2016-09-181-1/+1
| | | | | | | | | Replace explicit NULL comparison with equivalent expression to resolve checkpatch issue. - x != NULL => x Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: fix alignment for if argumentsGargi Sharma2016-09-161-1/+1
| | | | | | | Reduce indentation of multi-line if-test arguments for better readability. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: remove blank line before closing braceGargi Sharma2016-09-161-7/+0
| | | | | | | | delete blank line before '}' to fix the checkpatch issue Blank lines aren't necessary before a closing brace '}'. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: add spaces around |Gargi Sharma2016-09-161-1/+1
| | | | | | | | insert spaces around '|' to fix the checkpatch issue spaces preferred around that '|'. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: remove blank line after open braceGargi Sharma2016-09-161-6/+0
| | | | | | | | delete a blank line after an open brace to fix the check patch issue, Blank lines aren't necessary after an open brace '{'. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: remove unnecessary parenthesesGargi Sharma2016-09-161-16/+16
| | | | | | | | ! has higher priority than && or ||, so remove parentheses around ! expressions to make the code more readable. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: move AND operator for logical continuationGargi Sharma2016-09-161-4/+4
| | | | | | | | Move && up to the previous line, to fix the checkpatch issue Logical continuations should be on the previous line. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: fix block commentsClifton Barnes2016-03-303-63/+88
| | | | | | | | fix checkpatch.pl warning about 'Block comments use a trailing */ on a separate line' and 'Block comments use * on subsequent lines' Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: fix bare use of 'unsigned'Clifton Barnes2016-03-292-5/+8
| | | | | | | | fix checkpatch.pl warning about 'Prefer 'unsigned int' to bare use of 'unsigned'' Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: fix code indentClifton Barnes2016-03-291-4/+4
| | | | | | | | fix checkpatch.pl warning about 'suspect code indent for conditional statements' Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: fix 'line over 80 characters'Clifton Barnes2016-03-291-1/+2
| | | | | | | fix checkpatch.pl warning about 'line over 80 characters' Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: remove extra braces from if stmt (single branch)Nicholas Sim2016-03-281-4/+4
| | | | | | | | Remove braces from one branch of if statement where both branches only have a single line of code, as suggested in Documentation/CodingStyle Signed-off-by: Nicholas Sim <nicholassimws@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: ensure braces on all arms of if stmtNicholas Sim2016-03-281-1/+2
| | | | | | | | Added braces on else arm of if statement where if arm already has braces as suggested for clarity in Documentation/CodingStyle Signed-off-by: Nicholas Sim <nicholassimws@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: xgifb: remove useless blank linesBen Marsh2016-03-111-4/+0
| | | | | | | | 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>
* staging: xgifb: Avoid multiple blank linesRehas Sachdeva2016-03-114-7/+0
| | | | | | | | 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>
* staging: xgifb: Fix comment styleJanani Ravichandran2016-02-141-1/+2
| | | | | | | 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>
* staging: xgifb: Remove unneeded parenthesesJanani Ravichandran2016-02-112-17/+17
| | | | | | | | | | | | | | | | | | | | | 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>
* Staging: xgifb: Remove unnecessary blank linesBhumika Goyal2016-02-111-6/+0
| | | | | | | | 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>
* Staging: xgifb: Remove space after type castBhumika Goyal2016-02-111-11/+11
| | | | | | | | 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>
* drivers: staging: xgifb: vgatypes.h: fixed coding style warningsSaatvik Arya2016-02-071-3/+4
| | | | | | | fixed warnings about comment block coding style Signed-off-by: Saatvik Arya <aryasaatvik@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: Don't use multiple blank linesBenoit Hiller2016-02-071-2/+0
| | | | | | | | 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>
* Staging: xgifb: Remove space after castNavya Sri Nizamkari2015-10-241-3/+3
| | | | | | | | | 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>
* Staging: xgifb: Fix comparison to NULL warningNavya Sri Nizamkari2015-10-241-4/+4
| | | | | | | | 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>
* Staging: xgifb: Remove extra blank lines.Navya Sri Nizamkari2015-10-241-1/+0
| | | | | | | | | 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>
* Staging: xgifb: Remove blank line before } and after {Navya Sri Nizamkari2015-10-241-6/+0
| | | | | | | | 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>
* Staging: xgifb: Replace udelay, mdelay functions with usleep_rangeNavya Sri Nizamkari2015-10-241-41/+41
| | | | | | | | | | | | | | 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>
* staging: xgifb: make XGIfb_has_VB return booleanGeliang Tang2015-10-241-3/+3
| | | | | | | | 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>
* Staging: xgifb: vb_util: Fixed sparse warning of bit truncation due to castShivani Bhardwaj2015-10-021-2/+2
| | | | | | | | | 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>
* staging: xgifb: Remove unnecessary externsJoe Perches2015-08-142-19/+19
| | | | | | | | | | | 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>
* staging/xgifb: fix dumpVGAReg compile error if DEBUG is setPeter Huewe2015-07-311-4/+4
| | | | | | | | | | | 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>
* staging/xgifb: Move register helper functions to headerPeter Huewe2015-07-143-48/+40
| | | | | | | | | 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>
* staging: xgifb: prefer using the BIT macroHari Prasath Gujulan Elango2015-07-141-2/+2
| | | | | | | 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>
* staging: xgifb: use arch_phys_wc_add() and ioremap_wc()Luis R. Rodriguez2015-05-311-21/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* staging: xgifb: use swap() in XGI_WriteDAC()Fabian Frederick2015-05-311-13/+6
| | | | | | | Use kernel.h macro definition. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: xgifb: vb_setmode: Fixed spelling errorColin Cronin2015-05-311-1/+1
| | | | | | | Fixed spelling error in comment. Signed-off-by: Colin Cronin <colinpatrickcronin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: xgifb: remove extra parentheses around right bit shift operationsAya Mahfouz2015-03-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* staging: xgifb: rewrite the right hand side of an assignmentAya Mahfouz2015-02-261-70/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* staging: xgifb: fix colours on big-endian machines other than powerpcAaro Koskinen2015-02-071-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>
* staging: xgifb: remove unnecessary checkSudip Mukherjee2015-01-171-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>
* staging: xgifb: Removed a definition which was not used in driverSarah Khan2014-11-031-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>
* Staging: xgifb: fix space before commaBrian Vandre2014-10-291-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>
* staging: remove unneeded parentheses around the right hand side of an assignmentJiayi Ye2014-10-271-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>
* staging: xgifb: Removed an unnecessary assignment statementSarah Khan2014-10-271-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>
* staging: xgifb: remove unnecessary elseThomas Gummerer2014-09-063-37/+26
| | | | | Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: xgifb: Fixed a code-style warningChaitanya Hazarey2014-05-241-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>
* staging: xgifb: Update TODOLubomir Rintel2014-05-181-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>
* staging: xgifb: Drop some more useless definesLubomir Rintel2014-05-181-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>
* staging: xgifb: Initialize Part0PortLubomir Rintel2014-05-181-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>
OpenPOWER on IntegriCloud