summaryrefslogtreecommitdiff
path: root/drivers/staging/sm7xxfb/sm7xxfb.c
AgeCommit message (Collapse)Author
2015-08-07staging: sm7xxfb: merge sm712fb with fbdevSudip Mukherjee
Now since all cleanups are done and the code is ready to be merged lets move it out of staging into fbdev location. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-16staging: sm7xxfb: usr fb_read and fb_writeSudip Mukherjee
Now since the Big-Endian and Little-Endian based calculations are moved into a macro we can make fb_read() and fb_write() common for both Little-Endian and Big-Endian. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-16staging: sm7xxfb: define new macrosSudip Mukherjee
Define and use some new macros to work with different situations based on little-endian and big-endian. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14staging: sm7xxfb: use kernel commandlineSudip Mukherjee
We were only using the kernel commandline to set the mode if this driver is builtin, but when it is built as a module we were not having any way to set the mode. Start using commandline even if it is built as a module. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14staging: sm7xxfb: fix error handlingSudip Mukherjee
We were checking smtc_regbaseaddress and that too at a place where it can never be NULL. Real check should be on sfb->lfb immediately after we do ioremap. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17staging: sm7xxfb: fix camelcaseSudip Mukherjee
Fix the checkpatch warning about CamelCase. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17staging: sm7xxfb: fix indentionSudip Mukherjee
Fix the odd indention of vesa_mode_table. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17staging: sm7xxfb: move mode tableSudip Mukherjee
move vgamode table from the header file to the C file and mark it as const. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17staging: sm7xxfb: reduce indentionSudip Mukherjee
reduce code indention keeping the logic same. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17staging: sm7xxfb: fix alignmentSudip Mukherjee
Fix the alignment. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17staging: sm7xxfb: no space after castSudip Mukherjee
fixes the checkpatch warning about using space after typecast. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17staging: sm7xxfb: add newlineSudip Mukherjee
new line was missing in some of the dev_* macros while printing the debug and error messages. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17staging: sm7xxfb: remove numvgamodesSudip Mukherjee
numvgamodes was only used in one place, so remove the #define and use its defined value. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17staging: sm7xxfb: declare struct as constSudip Mukherjee
The vesa_mode_table is not to be modified, so declare it as const. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08staging: sm7xxfb: remove unused functionsSudip Mukherjee
removed the smtc_alloc_fb_info() and smtc_free_fb_info() functions which were not used anymore. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08staging: sm7xxfb: use framebuffer_alloc and releaseSudip Mukherjee
use the standard framebuffer_alloc() and framebuffer_release() instead of custom defined function. for making that change we had to change a member of the private structure from a variable to pointer and had to touch almost all places of the file. since fb was changed into a pointer so all instance of "sfb->fb." has been changed into "sfb->fb->". now we will get build warning about smtc_alloc_fb_info() and smtc_free_fb_info() to be unused which will be removed in the next patch of the series. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03staging: sm7xxfb: disable pci deviceSudip Mukherjee
disable the pci device when the module exits. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03staging: sm7xxfb: reserve PCI resourceSudip Mukherjee
before starting to access any address inside the PCI region we should reserve the resource and release the resource when the module exits. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26staging: sm7xxfb: add MODULE_DEVICE_TABLESudip Mukherjee
add MODULE_DEVICE_TABLE to support hot-plugging. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20staging: sm7xxfb: change return of sm7xx_vga_setupSudip Mukherjee
change return type of sm7xx_vga_setup() to void as we are not using the return type anywhere. if this function fails we fall back to the default configuration. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20staging: sm7xxfb: remove unneeded __setupSudip Mukherjee
as we start to use kernel boot parameters and fb_get_options() we donot need to use __setup() any more. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20staging: sm7xxfb: use module init and exitSudip Mukherjee
use module_init() and module_exit() instead of module_pci_driver and at the same time make way for use of kernel boot parameters. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07staging: sm7xxfb: fix remaining CamelCaseSudip Mukherjee
since mixed case names are not encouraged in coding, so those has been changed to their corresponding lowercase version. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07staging: sm7xxfb: fix CamelCaseSudip Mukherjee
since mixed case names are not encouraged in coding, so those has been changed to their corresponding lowercase version. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07staging: sm7xxfb: make smtc_scr_info staticMax Perepelitsyn
This symbol is never used anywhere else besides sm7xxfb.c Signed-off-by: Max Perepelitsyn <mperepelitsyn@gmail.com> Tested-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: sm7xxfb: fix alignmentSudip Mukherjee
checkpatch cleanup: alignment should match open parenthesis Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: sm7xxfb: remove unnecessary blank linesSudip Mukherjee
checkpatch cleanup: blank lines are not necessary before closing brace and after opening brace. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: sm7xxfb: no space is necessary after a castSudip Mukherjee
checkpatch cleanup: space is not necessary after cast Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: sm7xxfb: add missing blank lineSudip Mukherjee
checkpatch cleanup to add missing blank line after declaration Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25Revert "staging: sm7xxfb: remove driver"Sudip Mukherjee
This reverts commit "dc93c85235efa5201e9a3c116bc3fbd1afc1a182" Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28staging: sm7xxfb: remove driverGreg Kroah-Hartman
It hasn't been worked on in a very long time, and the original author has moved on to a different product as this one is no longer being made. So remove the driver. If someone wants to resurect it, and clean it up and get it merged to the "proper" part of the kernel, this commit can be reverted. Cc: Teddy Wang <teddy.wang@siliconmotion.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27Staging: sm7xxfb: Fix quoted string split across lines in sm7xxfb.cMonam Agarwal
This patch fixes the following checkpatch.pl issues in sm7xxfb.c: WARNING: Quoted string split across lines Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08drivers: sm7xxfb: Mark function as static in sm7xxfb.cRashika Kheria
Mark function smtcfb_setmode() as static in sm7xxfb.c because it is not used outside this file. This eliminates the following warning in sm7xxfb.c: drivers/staging/sm7xxfb/sm7xxfb.c:588:6: warning: no previous prototype for ‘smtcfb_setmode’ [-Wmissing-prototypes] Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Acked-by: Javier M. Mellid <jmunhoz@igalia.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-11Staging: sm7xxfb: fix line over 80 characters in sm7xxfb.cEbru Akagunduz
Fix checkpatch.pl issues with line over 80 characters in sm7xxfb.c Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-30Staging: sm7xxfb: fixed line break coding style issuesMartin Berglund
Fixed coding style issues. Signed-off-by: Martin Berglund <martin@rogsta.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25staging: sm7xxfb: 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-03-11staging/sm7xxfb: Convert to SIMPLE_DEV_PM_OPSPeter Huewe
Instead of assigning the pm_ops fields individually we can simply use SIMPLE_DEV_PM_OPS. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Acked-by: Javier Muñoz <jmunhoz@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21staging: sm7xxfb: remove use of __devexitBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21staging: sm7xxfb: remove use of __devinitBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21staging: sm7xxfb: remove use of __devexit_pBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: sm7xxfb: remove smtc_VRAMBaseAddressJavier M. Mellid
This patch erases smtc_VRAMBaseAddress variable. Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: sm7xxfb: rename pFramebufferPhysical to mmio_baseJavier M. Mellid
This patch renames pFramebufferPhysical name to mmio_base. Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: sm7xxfb: rename some smtcfb_info fieldsJavier M. Mellid
This patch improves naming style and comments on smtcfb_info fields. Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: sm7xxfb: annotate iomem pointersJavier M. Mellid
This patch annotates iomem pointers. Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: sm7xxfb: cleanup on smtc_alloc_fb_infoJavier M. Mellid
This patch improves code legibility after last changes. Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: sm7xxfb: clean smtcfb_fix's id initializationJavier M. Mellid
Setting up smtcfb_fix's id happens through smtc_alloc_fb_info. It adds complexity and unnecesary code. Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17staging: sm7xxfb: clean fb_fix_screeninfo and fb_var_screeninfo initializationJavier M. Mellid
Part of fb_fix_screeninfo and fb_var_screeninfo initialization happens in smtc_alloc_fb_info. It duplicates code while hiding the real functionality of smtc_alloc_fb_info. This patch groups initialization together. Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04staging: sm7xxfb: copy device name before we pass to the smtc_alloc_fb_infoDevendra Naga
the name is not initialised and passed to the function smtc_alloc_fb_info and copies the name into a member of fb structure. copy the name before calling alloc_fb_info. Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Acked-by: Javier Muñoz <jmunhoz@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-19staging: sm7xxfb: fix for "rename smtc_screen_info to smtc_scr_info"Stephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Javier Muñoz <jmunhoz@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>