1
0
Fork 0
Commit Graph

21 Commits (53621860c38caff37fff99ba5f0b817511907bc4)

Author SHA1 Message Date
Stephen Rothwell 59e32c490e staging: sm7xxfb: fix for "rename smtc_screen_info to smtc_scr_info"
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>
2012-07-19 15:36:08 -07:00
Devendra Naga cd96aeca4d staging/sm7xxfb: select sm7xxfb only when CONFIG_PCI is enabled
the sm7xxfb is a pci device, and should depend on the PCI.
And also if we wont' depend on the PCI sub-system, the following warns
will be triggered,

drivers/staging/sm7xxfb/sm7xxfb.c:1061:1: warning: data definition has no type or storage class [enabled by default]
drivers/staging/sm7xxfb/sm7xxfb.c:1061:1: warning: type defaults to 'int' in declaration of 'module_pci_driver' [-Wimplicit-int]
drivers/staging/sm7xxfb/sm7xxfb.c:1061:1: warning: parameter names (without types) in function declaration [enabled by default]

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Teddy Wang <teddy.wang@siliconmotion.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 18:55:13 -07:00
Javier M. Mellid 13a05eaa9d staging: sm7xxfb: cleanup on smtc_alloc_fb_info
This patch improves coding style on smtc_alloc_fb_info.

Tested with SM712.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 18:50:17 -07:00
Javier M. Mellid cd4653ae71 staging: sm7xxfb: move pseudo palette into smtcfb_info
This patch moves pseudo palette into smtcfb_info struct.

Tested with SM712.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 18:50:17 -07:00
Javier M. Mellid 4a7c2e0d73 staging: sm7xxfb: minor maintenance on timing path
This patch keeps smtc_set_timing and sm7xx_set_timing functions closed
to smtcfb_setmode. This change eases reviewing and maintaining this
logic path.

Tested with SM712.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 18:50:16 -07:00
Javier M. Mellid 0f9af641f2 staging: sm7xxfb: rename sm712_set_timing to sm7xx_set_timing
sm712_set_timing handles timing for 0x710, 0x712 and 0x720 chips. This
patch renames the name of the function of sm712_set_timing to
sm7xx_set_timing.

Tested with SM712.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 18:50:16 -07:00
Javier M. Mellid 1df7e0e234 staging: sm7xxfb: minor maintenance on sm7xx_vga_setup
This patch keeps code related to sm7xx_vga_setup closed. It is useful to
understand/maintain the logic behind sm7xx_vga_setup with a simple look.

Tested with SM712.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 18:50:16 -07:00
Javier M. Mellid 03e9e70917 staging: sm7xxfb: rename sm712vga_setup to sm7xx_vga_setup
This patch renames sm712vga_setup to sm7xx_vga_setup. sm7xx_vga_setup
process command line options in order to get the vga parameter. This
parameter will be the lookup index to match the right vesa mode. It is
chip independent.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 18:50:16 -07:00
Javier M. Mellid 013db67415 staging: sm7xxfb: rename smtc_screen_info to smtc_scr_info
This change of name improves readability on sm712_vga_setup and
smtcfb_pci_probe. It is coherent with the name of vars being used on
code while avoiding the use of extra long lines in functions.

Tested with SM712.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 18:50:16 -07:00
Javier M. Mellid 4102d9f86d staging: sm7xxfb: rename index var on sm712vga_setup
This patchs renames index var on sm712vga_setup.

Tested with SM712.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 18:50:16 -07:00
Javier M. Mellid 95c59dc96d staging: sm7xxfb: fix struct names related to vesa modes
This patch renames structs related to vesa modes in order to get more
readable code on sm712vga_setup.

Tested with SM712.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 18:49:49 -07:00
Devendra Naga fd67859d38 staging/sm7xxfb: return a proper err for smtc_alloc_fb_info failure
as smtc_alloc_fb_info can fail, but we are returning the 0,
how? because the pci_enable_device succeeded, which makes the probe
return 0, and may cause panics or some strange problems at remove
when driver unloaded by modprobe -r.

so return err properly as smtc_alloc_fb_info is doing kzallocs its
good to do -ENOMEM

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-11 17:26:01 -07:00
Devendra Naga e6345c81b4 staging/sm7xxfb: use module_pci_driver macro
as the manual of module_pci_driver says that
it can be used when the init and exit functions of
the module does nothing but the pci_register_driver
and pci_unregister_driver.

use it for the sm7xxfb driver, as the driver does nothing in
its _init and _exit functions but the register and unregister.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-11 17:26:01 -07:00
Javier M. Mellid 501b02e4d6 staging: sm7xxfb: erase hardcode cast between smtcfb_info and fb_info
This patch erases hardcode cast between smtcfb_info and fb_info in order
to get a more robust and less rigid smtcfb_info structure. fb_info
doesn't need to be the first field in smtcfb_info after this patch.

Tested with SM712.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-06 16:08:58 -07:00
Javier M. Mellid 7813296d22 staging: sm7xxfb: rename vars holding device and revision ids
This patch fixes CamelCase var names in smtcfb_info holding device and
revision identifiers.

Tested with SM712.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-06 16:08:58 -07:00
Javier M. Mellid f204739736 staging: sm7xxfb: code cleanup on smtcfb_setmode
Code cleanup on smtcfb_setmode.

Tested with SM712.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-26 15:03:54 -07:00
Javier M. Mellid 128e8616fa staging: sm7xxfb: delete unnecessary color map allocation
This patchs erases fb_alloc_cmap call in smtc_free_fb_info. In the
future, when needed, the required function to call here should be
fb_dealloc_cmap.

Tested with SM712.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-26 15:03:54 -07:00
Javier M. Mellid 50b238b186 staging: sm7xxfb: dead code removal
This patch removes dead code related to BaseAddressInVRAM. It fixes
comment on RAM control bits too.

Tested with SM712.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-26 15:03:54 -07:00
Javier M. Mellid 9b1904c7cf staging: sm7xxfb: dead code removal
This patch removes dead code.

Tested with SM712.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-26 15:03:54 -07:00
Justin P. Mattock 7756d3e8b0 staging: sm7xxfb: Fix typos in sm7xxfb
The below patch fixes some typos found in staging "sm7xxfb" while
reading through.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-25 10:50:00 -07:00
Javier M. Mellid 925aa6600c staging: sm7xxfb: sm7xx becomes sm7xxfb
Rename sm7xx driver to sm7xxfb. Fix Kconfig and Makefile to fit the new
change.

Changes are coherent with the rest of stable framebuffer drivers. TODO
updated.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:55:54 -07:00