aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/sm750fb
AgeCommit message (Collapse)AuthorFilesLines
2017-11-06staging: sm750fb: Fix parameter mistake in poke32Gravatar Huacai Chen 1-1/+1
In commit c075b6f2d357ea9 ("staging: sm750fb: Replace POKE32 and PEEK32 by inline functions"), POKE32 has been replaced by the inline function poke32. But it exchange the "addr" and "data" parameters by mistake, so fix it. Fixes: c075b6f2d357ea9 ("staging: sm750fb: Replace POKE32 and PEEK32 by inline functions"), Signed-off-by: Huacai Chen <chenhc@lemote.com> Signed-off-by: Liangliang Huang <huangll@lemote.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-03staging: sm750fb: Remove typedef struct _dvi_ctrl_device_tGravatar Mihaela Muraru 2-4/+4
This patch removes typedef from struct and renames it from "_dvi_ctrl_device_t" to "dvi_ctrl_device" as per kernel coding standards. Issue found by checpatch.pl Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-03staging: sm750fb: remove typedef for enum in ddk750_sii164.{c,h}Gravatar Keerthi Reddy 2-3/+4
Removing this will make sure that we are actually working with enum. Also it is not a good coding style to use typedef. In this commit remove typedef and also drop '_t' which traditionally means typedef Signed-off-by: Keerthi Reddy <keerthigd4990@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-03Staging: sm750fb: remove typedef for enum in ddk750_power.{c,h}Gravatar Keerthi Reddy 2-5/+4
Using typedef will hide that 'DPMS_t' is enum. Removing this will make sure that we are actually working with enum. Also it is not a good coding style to use typedef In this commit remove typedef and lowercaser the name 'DPMS_t'. And also drop '_t' which traditionally means typedef. Signed-off-by: Keerthi Reddy <keerthigd4990@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-17staging: sm750fb: Remove extra blank linesGravatar Harsha Sharma 1-4/+0
This was reported by checkpatch.pl Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-18staging: sm750fb: avoid conflicting vesafbGravatar Teddy Wang 1-0/+24
If vesafb is enabled in the config then /dev/fb0 is created by vesa and this sm750 driver gets fb1, fb2. But we need to be fb0 and fb1 to effectively work with xorg. So if it has been alloted fb1, then try to remove the other fb0. In the previous send, why #ifdef is used was asked. https://lkml.org/lkml/2017/6/25/57 Answered at: https://lkml.org/lkml/2017/6/25/69 Also pasting here for reference. 'Did a quick research into "why". The patch d8801e4df91e ("x86/PCI: Set IORESOURCE_ROM_SHADOW only for the default VGA device") has started setting IORESOURCE_ROM_SHADOW in flags for a default VGA device and that is being done only for x86. And so, we will need that #ifdef to check IORESOURCE_ROM_SHADOW as that needs to be checked only for a x86 and not for other arch.' Cc: <stable@vger.kernel.org> # v4.4+ Signed-off-by: Teddy Wang <teddy.wang@siliconmotion.com> Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-16staging: sm750fb: fixed a assignment typoGravatar Lynn Lei 1-1/+1
fixed a typo issue in get_mxclk_freq() function. the original code using PLL_CTRL_M_SHIFT for shifting to set N flag. which is not right, it should be PLL_CTRL_N_SHIFT. both PLL_CTRL_M_SHIFT and PLL_CTRL_N_SHIFT defined in drivers/staging/sm750fb/ddk750_reg.h Signed-off-by: Lynn Lei <lynnl.wit@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29drivers: staging: sm750: Hold lock irrespective of fb numbers.Gravatar Dhananjay Balan 1-13/+13
Start holding the lock for all cases irrespective of number of fb, there could be a deadlock since this number could change in the lifetime of this lock Signed-off-by: Dhananjay Balan <mail@dbalan.in> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-25staging: sm750fb - add parameter namesGravatar Derek Robson 1-8/+16
Fixed checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name" in header files. Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23staging: sm750fb: change default screen resolutionGravatar Sudip Mukherjee 1-1/+1
The previous patch which updated screen resolution was tested under wrong environment. sm750 driver does not support 24bpp. It only supports 8bpp, 16bpp and 32bpp. Lets update the default screen resolution to use 32bpp for a better screen performance. Fixes: ac669251087d ("staging: sm750fb: change default screen resolution") Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-06staging: sm750fb: change default screen resolutionGravatar Sudip Mukherjee 1-1/+1
Update the default screen resolution and also use 24bpp for a better screen performance. Tested-by: Teddy Wang <teddy.wang@siliconmotion.com> Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-18staging: sm750fb: fix length of lines, function calls and declarationGravatar Matej Dujava 11-161/+125
This patch breaks lines that are longer than 80 characters and joins together those, that are too short and can be placed at one. Function calls and declarations are updated to fit kernel code style. Signed-off-by: Matej Dujava <mdujava@kocurkovo.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08staging: sm750fb: removed line continuations in quoted stringsGravatar Prasant Jalan 1-9/+9
checkpatch gives WARNING: Avoid line continuations in quoted strings. Trivial fix by removing line continuations and adding another quote at the start of next line. Signed-off-by: Prasant Jalan <prasant.jalan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08staging: sm750fb: fixing function return with lock heldGravatar Prasant Jalan 1-4/+8
lynxfb_suspend() & lynxfb_resume() return on errors while holding console_lock. Adding 'goto' such that proper cleanups can be done before returning from function and therefore console_lock can be released before returning. Signed-off-by: Prasant Jalan <prasant.jalan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08staging: sm750fb: ddk750_display.c - fixed checkpatch warning: line over 80 ↵Gravatar Andrea della Porta 1-1/+2
chars staging: sm750fb: ddk750_display.c - fixed the following checkpatch warning: WARNING: line over 80 characters #149: FILE: drivers/staging/sm750fb/ddk750_display.c:149: + swPanelPowerSequence((output & PNL_SEQ_MASK) >> PNL_SEQ_OFFSET, 4); Signed-off-by: Andrea della Porta <sfaragnaus@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: sm750fb: Remove typedef from "typedef enum _spolarity_t"Gravatar Arushi Singhal 1-6/+5
This patch removes typedefs from enum and renames it from "typedef enum _spolarity_t" to "enum spolarity" as per kernel coding standards." Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: sm750fb: Remove typedef from "typedef struct _mode_parameter_t"Gravatar Arushi Singhal 3-9/+9
This patch removes typedefs from struct and renames it from "typedef struct _mode_parameter_t" to "struct mode_parameter" as per kernel coding standards." Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21staging:sm750fb: Code readability is improved.Gravatar Arushi Singhal 1-25/+30
New variables are added to make the code more readable. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-16staging: sm750fb: Removes unused variable from sm750_hw_copyareaGravatar Tahia Khan 1-3/+0
Removes unused variable opSign from sm750_hw_copyarea. Identified using coccinelle script 'unused.cocci'. Signed-off-by: Tahia Khan <tahia.khan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-14staging: sm750fb: Alignment should match open parenthesisGravatar Arushi Singhal 1-40/+39
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis". Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-14staging: sm750fb: fixes add blank line after function/struct/union/enum ↵Gravatar Arushi Singhal 1-0/+3
declarations This patch fixes the warnings reported by checkpatch.pl for please use a blank line after function/struct/union/enum declarations. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-14staging: sm750fb: function prototype argument should have an identifier nameGravatar Arushi Singhal 4-5/+5
function prototype arguments like 'struct vb_device_info *','unsigned long' etc. should have an identifier name. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: sm750fb: Removed unnecessary parentheses.Gravatar Varsha Rao 4-5/+5
Removed parentheses on the right hand side of assignment, as they are not required. The following coccinelle script was used to fix this issue: @@ local idexpression id; expression e; @@ id = -( e -) Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: sm750fb: Remove blank lines after { and before } braces.Gravatar Varsha Rao 3-9/+0
Removed unnecessary blank lines after open brace and before closed braces, to fix the check patch issue. Also removed braces which were not required. Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: sm750fb: Replace NULL comparison.Gravatar Varsha Rao 1-1/+1
Replaced NULL comparison with pCurrentDviCtrl->pfnInit. This patch fixes the following checkpatch issue: CHECK: Comparison to NULL could be written "pCurrentDviCtrl->pfnInit" Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: sm750fb: Added spaces around arithmetic operators.Gravatar Varsha Rao 2-2/+2
Added spaces around arithmetic operators (/, *), to fix the checkpatch issue. Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: sm750fb: Remove unnecessary blank lines.Gravatar Varsha Rao 7-26/+0
Removed multiple blank lines, which are not required. This patch fixes the following check patch issues: CHECK: Please don't use multiple blank lines Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: sm750fb: Add identifier to function definition argument.Gravatar Varsha Rao 1-1/+1
Added pinit_param as the identifier to function definition argument struct initchip_param and this patch fixes the checkpatch issue. Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: sm750fb: Fix line over 80 characters.Gravatar Varsha Rao 1-5/+5
Line over 80 characters are split to fix the following checkpatch issue: WARNING: line over 80 characters Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: sm750fb: Add braces around if statement.Gravatar Varsha Rao 1-2/+2
Added braces around if statement. This patch fixes the following checkpatch issue: CHECK: braces {} should be used on all arms of this statement Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: sm750fb: add spaces around operatorsGravatar Katie Dunne 1-5/+5
Add spaces around operators -, *, ?:, >>, << to conform to kernel style. These instances were found with checkpatch.pl Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: sm750fb: add curly braces to if-statementsGravatar Katie Dunne 1-13/+13
Add curly braces to if-statements for style compliance. These cases are found by checkpatch.pl Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12Staging: sm750fb: sm750.c - style fixGravatar Derek Robson 1-1/+1
Change permissions to octal style. Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09staging: sm750fb: Replace POKE32 and PEEK32 by inline functionsGravatar Matthieu Simon 10-173/+180
POKE32 and PEEK32 have been replaced by inlined functions poke32 and peek32. Having inline functions instead of macros help to get the correct type-checking and avoid the possible precedence issues reported by checkpatch. Signed-off-by: Matthieu Simon <gmatthsim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-10staging:sm750fb:ddk750_chip.c removes un-necessary blank linesGravatar Scott Matheina 1-3/+0
Fixes checkpatch warning - Please don't use multiple blank lines Signed-off-by: Scott Matheina <scott@matheina.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-10staging:sm750fb:ddk750_chip.c Adds braces to last arm of statementGravatar Scott Matheina 1-1/+2
Fixes absence of braces on last arm of statement, identified by checkpatch Signed-off-by: Scott Matheina <scott@matheina.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-10staging: sm750fb: fix checkpatch 80 characters warningGravatar Abdul Rauf 1-2/+4
Fix the following warnings: line over 80 characters Signed-off-by: Abdul Rauf <abdulraufmujahid@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-10staging: sm750fb: fix checkpatch multiple blank lines checkGravatar Abdul Rauf 1-1/+0
Fix the following checks: Please don't use multiple blank lines Signed-off-by: Abdul Rauf <abdulraufmujahid@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-30staging: sm750fb: fix tabstop style warningGravatar Andrea Ghittino 1-1/+1
Fixes sm750fb tabstop style warning found by checkpatch.pl tool Signed-off-by: Andrea Ghittino <aghittino@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-29staging: sm750fb: fix a type issue in sm750_set_chip_type()Gravatar Dan Carpenter 2-2/+2
"revId" needs to be unsigned because we use it to test: if (revId == SM750LE_REVISION_ID) { and SM750LE_REVISION_ID is ((unsigned char )0xfe). Fixes: 81dee67e215b ("staging: sm750fb: add sm750 to staging") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-29staging: sm750fb: update licenseGravatar Sudip Mukherjee 1-1/+1
The driver was actually released with BSD license. It also gained GPL when it was submitted to be included in the kernel. Cc: Teddy Wang <teddy.wang@siliconmotion.com> Cc: gzhou1 <guojian.zhou@windriver.com> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14Merge 4.9-rc5 into staging-nextGravatar Greg Kroah-Hartman 1-4/+4
We want the staging/iio fixes in here as well to resolve issues and merge problems. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-10staging: sm750fb: prefix global identifiersGravatar Arnd Bergmann 13-73/+73
Renaming some symbols inside this driver caused a conflict with an existing function, which in turn results in a link error: drivers/staging/sm750fb/sm750fb.o: In function `enable_dma': ddk750_hwi2c.c:(.text.enable_dma+0x0): multiple definition of `enable_dma' This adds a sm750_ prefix to each global symbol in the sm750fb driver that does not already have one. I manually looked for the symbols and then converted the driver using for i in calc_pll_value format_pll_reg set_power_mode set_current_gate \ enable_2d_engine enable_dma enable_gpio enable_i2c hw_set2dformat \ hw_de_init hw_fillrect hw_copyarea hw_imageblit hw_cursor_enable \ hw_cursor_disable hw_cursor_setSize hw_cursor_setPos \ hw_cursor_setColor hw_cursor_setData hw_cursor_setData2 ; do sed -i "s:\<$i\>:sm750_$i:" drivers/staging/sm750fb/*.[ch] done Fixes: 03140dabf584 ("staging: sm750fb: Replace functions CamelCase naming with underscores.") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07staging: sm750fb: Replace pr_*() with dev_*().Gravatar Elise Lennion 1-6/+6
dev_*() functions print identifying information about the struct device and should be used instead of pr_*() whenever possible. Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07staging: sm750fb: Fix bugs introduced by early commitsGravatar Huacai Chen 1-4/+4
Early commit 30ca5cb63c56965 ("staging: sm750fb: change definition of PANEL_PLANE_TL fields") and 27b047bbe1ee9c0 ("staging: sm750fb: change definition of PANEL_PLANE_BR fields") modify the register bit fields definitions. But the modifications are wrong, because the bit mask of "bit field 10:0" is not 0xeff, but 0x7ff. The wrong definition bugs makes display very strange. Signed-off-by: Huacai Chen <chenhc@lemote.com> Cc: stable <stable@vger.kernel.org> # 4.6+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-30staging: sm750fb: Shorten local variables names.Gravatar Elise Lennion 1-13/+13
Shorter names are preferred by C variables naming convention, they are easier to write and aren't more difficult to understand. Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-30staging: sm750fb: Replace functions CamelCase naming with underscores.Gravatar Elise Lennion 7-19/+19
Replace CamelCase function names with underscores to comply with the standard kernel coding style. Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-30staging: sm750fb: Refine code in set_current_gate().Gravatar Elise Lennion 1-20/+4
The 'switch' statement in set_current_gate() had only two possible scenarios, so it was replaced with an 'if' statement to make the code shorter and easier to understand. Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-27staging: sm750fb: Refine the code and remove unused code.Gravatar Elise Lennion 1-50/+21
Every call to the function waitNextVerticalSync() used the macro primaryWaitVerticalSync(), so the macro was removed and the function waitNextVerticalSync() renamed to primary_wait_vertical_sync(). With this change, an unnecessary 'if' statement was removed together with the lines within the 'else' statement, because it was never satisfied. The modified function was refined to better match the Kernel coding style. Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25staging: sm750fb: restructure multi-line comments to follow CodingStyleGravatar Eric S. Stone 12-127/+184
Eliminates all checkpatch.pl BLOCK_COMMENT_STYLE warnings in sm750fb, and coincidentally eliminates some line-length (80) warnings. Signed-off-by: Eric S. Stone <esstone@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>