Commit Graph

3376 Commits (a490a07a67b7a37f588021410e06b721a752fc34)

Author SHA1 Message Date
Archit Taneja d50cd0373a OMAP: DSS2: Add dss_features for omap4 and overlay manager related features
Initialize a dss_features struct for omap4.
Add support for LCD2 manager by introducing a new member in dss_feat_id.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2011-01-10 11:09:54 +02:00
Archit Taneja 8dad2ab672 OMAP: DSS2: Clean up DISPC color mode validation checks
The supported set of color modes varies for different DISPC pipelines(plane)
and omap version. This makes the checks for validation of a color mode more
complicated as new omap versions are added.

A dss_feature function is created which tells if a color_mode is supported
for a plane on the current omap revision.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2011-01-10 11:09:54 +02:00
Bryan Wu ac1427e13b OMAP: DSS2: Add back authors of panel-generic.c based drivers
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2011-01-10 11:09:54 +02:00
Bryan Wu da9d2f47aa OMAP: DSS2: remove generic DPI panel driver duplicated panel drivers
Still keep sharp_ls_panel driver, because it contains blacklight control driver.

Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Acked-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2011-01-10 11:09:54 +02:00
Bryan Wu a9a62b6a88 OMAP: DSS2: Add generic DPI panel display driver
Generic DPI panel driver includes the driver and 4 similar panel configurations. It
will match the panel name which is passed from platform data and setup the
right configurations.

With generic DPI panel driver, we can remove those 4 duplicated panel display
drivers. In the future, it is simple for us just add new panel configuration
date in panel-generic-dpi.c to support new display panel.

Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Acked-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2011-01-10 11:09:53 +02:00
Samreen 36e8c27f3b OMAP: DSS2: OMAPFB: Add null pointer check
A null pointer check added. And using kstrdup()
instead of kmalloc() & strcpy()

Signed-off-by: Samreen <samreen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2011-01-10 11:09:53 +02:00
Erik Gilling 2d2afa46e3 OMAP: DSS2: Add NEC NL8048HL11-01B display panel
NEC WVGA LCD NL8048HL11-01B panel support has been added.
This panel is being used in zoom2/zoom3/3630 sdp boards.

Signed-off-by: Mukund Mittal <mmittal@ti.com>
Signed-off-by: Rajkumar N <rajkumar.nagarajan@ti.com>
Signed-off-by: Samreen <samreen@ti.com>
CC: Subbu Venkatesh <subramani.venkatesh@windriver.com>
CC: Erik Gilling <konkers@android.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2011-01-10 10:54:19 +02:00
Rajkumar N fd28a39071 OMAP3630: DSS2: Enable Pre-Multiplied Alpha Support
Enable dss to process color formats with pre-mulitplied alpha.
With this we can have alpha values defined for each pixel
and hence can have different blending values for each pixel.
sysfs entry has been created for this and pre-multiplied alpha
support is turned off by default.

Signed-off-by: Sudeep Basavaraj <sudeep.basavaraj@ti.com>
Signed-off-by: Rajkumar N <rajkumar.nagarajan@ti.com>
Signed-off-by: Samreen <samreen@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2011-01-10 10:54:19 +02:00
Samreen 8fbde10aff OMAP3: DSS2: Split OMAP3 has feature for 3430 & 3630
Splitting the OMAP3 dss has feature separately for
omap3430 & omap3630

Signed-off-by: Samreen <samreen@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2011-01-10 10:54:18 +02:00
Archit Taneja 712247a681 OMAP: DSS2: Fix: Read correct bit in dispc_enable_alpha_blending()
Read correct DISPC_CONFIG bit when the channel is DIGIT, remove extra line
at the end of the function.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2011-01-10 10:54:18 +02:00
Linus Torvalds 23d69b09b7 Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
* 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (33 commits)
  usb: don't use flush_scheduled_work()
  speedtch: don't abuse struct delayed_work
  media/video: don't use flush_scheduled_work()
  media/video: explicitly flush request_module work
  ioc4: use static work_struct for ioc4_load_modules()
  init: don't call flush_scheduled_work() from do_initcalls()
  s390: don't use flush_scheduled_work()
  rtc: don't use flush_scheduled_work()
  mmc: update workqueue usages
  mfd: update workqueue usages
  dvb: don't use flush_scheduled_work()
  leds-wm8350: don't use flush_scheduled_work()
  mISDN: don't use flush_scheduled_work()
  macintosh/ams: don't use flush_scheduled_work()
  vmwgfx: don't use flush_scheduled_work()
  tpm: don't use flush_scheduled_work()
  sonypi: don't use flush_scheduled_work()
  hvsi: don't use flush_scheduled_work()
  xen: don't use flush_scheduled_work()
  gdrom: don't use flush_scheduled_work()
  ...

Fixed up trivial conflict in drivers/media/video/bt8xx/bttv-input.c
as per Tejun.
2011-01-07 16:58:04 -08:00
Linus Torvalds 56b85f32d5 Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
* 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (36 commits)
  serial: apbuart: Fixup apbuart_console_init()
  TTY: Add tty ioctl to figure device node of the system console.
  tty: add 'active' sysfs attribute to tty0 and console device
  drivers: serial: apbuart: Handle OF failures gracefully
  Serial: Avoid unbalanced IRQ wake disable during resume
  tty: fix typos/errors in tty_driver.h comments
  pch_uart : fix warnings for 64bit compile
  8250: fix uninitialized FIFOs
  ip2: fix compiler warning on ip2main_pci_tbl
  specialix: fix compiler warning on specialix_pci_tbl
  rocket: fix compiler warning on rocket_pci_ids
  8250: add a UPIO_DWAPB32 for 32 bit accesses
  8250: use container_of() instead of casting
  serial: omap-serial: Add support for kernel debugger
  serial: fix pch_uart kconfig & build
  drivers: char: hvc: add arm JTAG DCC console support
  RS485 documentation: add 16C950 UART description
  serial: ifx6x60: fix memory leak
  serial: ifx6x60: free IRQ on error
  Serial: EG20T: add PCH_UART driver
  ...

Fixed up conflicts in drivers/serial/apbuart.c with evil merge that
makes the code look fairly sane (unlike either side).
2011-01-07 14:39:20 -08:00
Linus Torvalds 3c0cb7c31c Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (416 commits)
  ARM: DMA: add support for DMA debugging
  ARM: PL011: add DMA burst threshold support for ST variants
  ARM: PL011: Add support for transmit DMA
  ARM: PL011: Ensure IRQs are disabled in UART interrupt handler
  ARM: PL011: Separate hardware FIFO size from TTY FIFO size
  ARM: PL011: Allow better handling of vendor data
  ARM: PL011: Ensure error flags are clear at startup
  ARM: PL011: include revision number in boot-time port printk
  ARM: vexpress: add sched_clock() for Versatile Express
  ARM i.MX53: Make MX53 EVK bootable
  ARM i.MX53: Some bug fix about MX53 MSL code
  ARM: 6607/1: sa1100: Update platform device registration
  ARM: 6606/1: sa1100: Fix platform device registration
  ARM i.MX51: rename IPU irqs
  ARM i.MX51: Add ipu clock support
  ARM: imx/mx27_3ds: Add PMIC support
  ARM: DMA: Replace page_to_dma()/dma_to_page() with pfn_to_dma()/dma_to_pfn()
  mx51: fix usb clock support
  MX51: Add support for usb host 2
  arch/arm/plat-mxc/ehci.c: fix errors/typos
  ...
2011-01-06 16:50:35 -08:00
Linus Torvalds f70f5b9dc7 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6: (25 commits)
  atyfb: Fix bootup hangs on sparc64.
  sparc: update copyright in piggyback.c
  sparc: unify strip command in boot/Makefile
  sparc: rename piggyback_32 to piggyback
  sparc: fix tftpboot.img for sparc64 on little-endian host
  sparc: add $BITS to piggyback arguments
  sparc: remove obsolete ELF support in piggyback_32.c
  sparc: additional comments to piggyback_32.c
  sparc: use _start for the start entry (like 64 bit does)
  sparc: use trapbase in setup_arch
  sparc: refactor piggy_32.c
  Added support for ampopts in APBUART driver. Used in AMP systems.
  APBUART: added raw AMBA vendor/device number to match against.
  SPARC/LEON: avoid AMBAPP name duplicates in openprom fs when REG is missing
  SPARC/LEON: added support for selecting Timer Core and Timer within core
  LEON: added raw AMBA vendor/device number to find TIMER, IRQCTRL
  SPARC/LEON: added support for IRQAMP IRQ Controller
  SPARC/LEON: find IRQCTRL and Timer via OF-Tree, instead of hardcoded.
  sparc: fix sparse warnings in arch/sparc/prom for 32 bit build
  sparc: remove unused prom tree functions
  ...
2011-01-06 15:30:54 -08:00
Russell King 404a02cbd2 Merge branch 'devel-stable' into devel
Conflicts:
	arch/arm/mach-pxa/clock.c
	arch/arm/mach-pxa/clock.h
2011-01-06 22:33:32 +00:00
David S. Miller 09798eb947 atyfb: Fix bootup hangs on sparc64.
After commit 25edd6946a ("sparc64: Get
rid of indirect p1275 PROM call buffer.")  we can't pass virtual
addresses >4GB to PROM calls.

Largely this is never necessary in drivers because we have a copy of
the entire PROM device tree in the kernel and a set of of_*()
interfaces to access it.

Unfortunately there were some lingering prom calls in the atyfb
driver, in particular prom_finddevice() was being called with an
on-stack address which could be anywhere.

This code is actually probing for information we already have, the
PROM choosen console output device is stored in of_console_device so
all of this nasty code consolidates into a one-line comparison.

Next we have some prom_getintdefault() calls which are trivially
transformed into the equivalent of_getintprop_default().

Special thanks to Fabio, who figured out exactly where the bootup
was hanging.  That made this bug trivial to fix.

Reported-by: Fabio M. Di NItto <fabbione@fabbione.net>
Reported-by: Sam Ravnborg <sam@ravnborg.org>
Reported-by: Frans van Berckel <fberckel@xs4all.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Fabio M. Di NItto <fabbione@fabbione.net>
2011-01-06 11:38:19 -08:00
Paul Mundt 1928e87bcf Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
	drivers/video/sh_mobile_lcdcfb.c

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-06 18:27:34 +09:00
Paul Mundt ca9c20ce2b Merge branch 'fbdev/udlfb' 2011-01-06 18:10:09 +09:00
Paul Mundt 81f6f3c104 video: udlfb: Kill off special printk wrappers, use pr_fmt().
This kills off all of the dl_xxx() printk wrappers and simply stubs in a
pr_fmt() definition to accomplish the same thing.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-06 18:07:54 +09:00
Paul Mundt b9f03a3cd0 video: udlfb: Kill off some magic constants for EDID sizing.
The edid length is fixed, so use the standard definition consistently.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-06 18:04:02 +09:00
Paul Mundt 1a3e528cfc video: udlfb: deifdefify (yes, that's a word).
udlfb selects all of the options it presently ifdef conditionalizes, so
none of the statements have any effect outside of aggravating eye strain.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-06 17:29:24 +09:00
Mayuresh Janorkar 17ca20cb7d fbdev: modedb: Add a new mode for 864x480 TAAL panels.
This adds a new entry to the modedb for 864x480 TAAL panels, the default
configuration for many OMAP boards. This enables omapfb to make use of
the standard mode parsing.

Signed-off-by: Mayuresh Janorkar <mayur@ti.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-06 16:02:42 +09:00
Stefani Seibold 748103e723 drivers/video/i810/i810-i2c.c: fix i2c bus handling
These patch fix a longstanding bug in the i810 frame buffer driver.

The handling of the i2c bus is wrong: A 1 bit should not written to the
i2c, these will be done by switch the i2c to input. Driving an 1 bit
active is against the i2c spec.

An active driven of a 1 bit will result in very strange error, depending
which side is the more powerful one. In my case it depends on the
temperature of the Display-Controller-EEprom: With an cold eprom a got
the correct EDID datas, with a warm one some of the 1 bits was 0 :-(

The same bug is also in the intelfb driver in the file
drivers/video/intelfb/intelfb_i2c.c. The functions intelfb_gpio_setscl()
and intelfb_gpio_setsda() do drive the 1 bit active to the i2c bus. But
since i have no card which is used by the intelfb driver i cannot fix
it.

Signed-off-by: Stefani Seibold <stefani@seibold.net>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-06 15:52:19 +09:00
Brent Cook 529ed806d4 video: Fix the HGA framebuffer driver
Resurrected some old hardware and fixed up the hgafb driver to work
again. Only tested with fbcon, since most fbdev-based software appears
to only support 12bpp and up. It does not appear that this driver has
worked for at least the entire 2.6.x series, perhaps since 2002.

Hercules graphics hardware uses packed pixels horizontally, but rows are
not linear. In other words, the pixels are not packed vertically. This
means that custom imageblit, fillrect and copyarea need to be written
specific to the hardware.

 * Removed the experimental acceleration option, since it is required
   for the hardware to work.
 * Fixed imageblit to work with fb_image's wider than 8 pixels.
 * Updated configuration text (HGA hardware is from 1984)

Signed-off-by: Brent Cook <busterb@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-06 15:48:13 +09:00
Julia Lawall e045da7d83 drivers/video/carminefb.c: improve error handling
This code had an error handling goto to the wrong place, a misplaced
release_mem_region, and a duplicated release_mem_region.

The semantic match that finds the double release_mem_region is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
expression e1,e2,e3;
position p1,p2,p3;
@@
release_mem_region@p1(e1, e2)@p3;
... when != request_mem_region(e1,e2,e3)
release_mem_region(e1, e2)@p2;

@@
expression e <= r.e1,e3;
expression r.e1,e2;
position r.p1,r.p2,r.p3,p!=r.p1;
@@
*release_mem_region(e1, e2)@p3;
... when != e = e3
*release_mem_region@p(e1, e2)@p2;// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-06 15:46:56 +09:00
Fabio Estevam 7ee04fd5d5 video: imxfb: Fix the maximum value for yres
MX27 and MX25 have 10 bits in the YMAX field of LCDC Size Register.

Fix the maximum value for yres.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-06 15:45:48 +09:00
Magnus Damm 417d48274e fbdev: sh_mobile_lcdcfb: Enable 32 bpp and 24 bpp support
This patch extends the LCDC driver with 24 bpp
and 32 bpp support.

These modes have been kept disabled earlier due
to dependencies between the potential two LCDC
channels that are exported as two separate
framebuffer devices. The dependency boils down
to a byte swap register that is shared between
multiple channels.

With this patch applied all single channel LCDC
hardware can chose freely from 16, 24 and 32 bpp.
Dual channel LCDC must stick to the same setup
for both channels.

Without this patch only 16 bpp is fully supported.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-06 15:43:18 +09:00
Paul Mundt 97cbc8fb1e Merge branch 'common/fbdev-mipi' of master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6 2011-01-05 17:30:20 +09:00
Guennadi Liakhovetski 14bbb7c615 fbdev: sh_mipi_dsi: use platform provided register layout and values
Different sh-mobile SoCs have variations in their MIPI DSI register layouts,
besides, different LCD panels require different configuration parameters. This
patch switches the driver to use platform-provided MIPI DSI parameters.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-05 17:22:32 +09:00
Guennadi Liakhovetski 236782a5f3 fbdev: sh-mobile: implement MIPI DSI runtime PM support
On SH-Mobile platforms using runtime PM with the MIPI DSI driver switches the
DSI Tx link clock on PM events.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2011-01-05 17:16:05 +09:00
Kuninori Morimoto 644a98453d fbdev: sh_mobile_hdmi: fixup compile error
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-29 13:06:29 +00:00
Linus Torvalds b094a870ae Merge branch 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6
* 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6:
  fbdev: sh_mobile_lcdc: increase maximum framebuffer size to support 1080p
  video: imxfb: Fix the maximum value for yres
  fb: fix overlapping test off-by-one.
  fbdev: sh-mobile: retrieve and propagate display sizes from EDID
  fbdev: sh-mobile: restore display size configuration
2010-12-27 10:33:30 -08:00
Guennadi Liakhovetski cb59bfc590 fbdev: sh_mobile_lcdc: increase maximum framebuffer size to support 1080p
LCDC hardware can support 1920x1080 formats, adjust the driver to cover them.
Besides, instead of guessing some "reasonable" validity checks, only verify
values in .fb_check_var(), that we are sure, we cannot support.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-27 23:06:29 +09:00
Fabio Estevam 60328917e6 video: imxfb: Fix the maximum value for yres
MX27 and MX25 have 10 bits in the YMAX field of LCDC Size Register.

Fix the maximum value for yres.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-27 23:05:55 +09:00
Dave Airlie acd0acb65e fb: fix overlapping test off-by-one.
On my system with a radeon x2, the first GPU was not overlapping vesa
but the test decided it was.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-24 12:33:55 +09:00
Axel Lin 5a2d6e31c6 backlight: cr_bllcd.c: fix a memory leak
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Thomas Hellstrom <thomas@tungstengraphics.com>
Cc: Alan Hourihane <alanh@tungstengraphics.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-12-22 19:43:34 -08:00
Jiri Kosina 4b7bd36470 Merge branch 'master' into for-next
Conflicts:
	MAINTAINERS
	arch/arm/mach-omap2/pm24xx.c
	drivers/scsi/bfa/bfa_fcpim.c

Needed to update to apply fixes for which the old branch was too
outdated.
2010-12-22 18:57:02 +01:00
Guennadi Liakhovetski 8c1ac08b38 fbdev: sh-mobile: retrieve and propagate display sizes from EDID
Monitor EDID contains information about physical display sizes. Retrieve
it and propagate to the framebuffer driver.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22 16:28:31 +09:00
Guennadi Liakhovetski e0b9fb2626 fbdev: sh-mobile: restore display size configuration
An earlier patch replaced open-coded video-mode configuration from
platform data by a call to fb_videomode_to_var(), thereby setting
ofdisplay sizes have been accidentally lost. Restore them.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22 16:28:26 +09:00
Aaro Koskinen 17d6ce1119 sisfb: eliminate compiler warnings
Convert some bit masks to 8-bit values to avoid the following compiler
warnings:

drivers/video/sis/sis_main.c:3858: warning: large integer implicitly truncated to unsigned type
drivers/video/sis/init301.c:5855: warning: large integer implicitly truncated to unsigned type
drivers/video/sis/init301.c:5869: warning: large integer implicitly truncated to unsigned type

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22 12:57:27 +09:00
Aaro Koskinen 114776776a sisfb: delete unused register I/O macros
Delete unused register I/O macros.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22 12:57:23 +09:00
Aaro Koskinen ad78adb4e8 sisfb: replace setSISIDXREG with SiS_SetRegANDOR
Replace setSISIDXREG() with SiS_SetRegANDOR().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22 12:57:19 +09:00
Aaro Koskinen 667a8b4114 sisfb: replace andSISIDXREG with SiS_SetRegAND
Replace andSISIDXREG() with SiS_SetRegAND().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22 12:57:14 +09:00
Aaro Koskinen 27799d6c40 sisfb: replace orSISIDXREG with SiS_SetRegOR
Replace orSISIDXREG() with SiS_SetRegOR().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22 12:57:10 +09:00
Aaro Koskinen 44b751bbe1 sisfb: replace outSISIDXREG with SiS_SetReg
Replace outSISIDXREG() with SiS_SetReg().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22 12:57:05 +09:00
Aaro Koskinen e57d413681 sisfb: replace inSISIDXREG with SiS_GetReg
Replace inSISIDXREG() with SiS_GetReg().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22 12:57:01 +09:00
Aaro Koskinen 63e13f8e2b sisfb: replace outSISREG with SiS_SetRegByte
Replace outSISREG() with SiS_SetRegByte().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22 12:56:57 +09:00
Aaro Koskinen 1e1687d78b sisfb: replace inSISREG with SiS_GetRegByte
Replace inSISREG() with SiS_GetRegByte().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22 12:56:51 +09:00
Aaro Koskinen f48b9644ef sisfb: change register I/O functions to use fixed size types
Use fixed-sized types (u8, u16, u32) instead of plain C types.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22 12:56:46 +09:00
Aaro Koskinen e68046b72e sisfb: remove duplicate function declarations
Remove duplicate register I/O function declarations by moving them into
a common header file.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22 12:56:41 +09:00
Aaro Koskinen b5b7dda7b5 sisfb: delete HAVE_CONFIG_H checks
Delete unneeded HAVE_CONFIG_H checks.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22 12:56:36 +09:00
Aaro Koskinen 679c489fff sisfb: eliminate unused variable compiler warning
Eliminate the following compiler warning on non-x86 platforms by limiting
the variable scope:

drivers/video/sis/sis_main.c:4108: warning: unused variable 'temp'

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-22 12:56:30 +09:00
Paul Mundt 7ccbefe07e Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2010-12-22 12:56:10 +09:00
Alexey Charkov 623eb15647 fbdev: Modify vsync timing calculation in wm8505fb
This removes the '+1' in vsync timing calculation for wm8505fb to
directly use values provided from the board setup code.

Signed-off-by: Alexey Charkov <alchark@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-21 01:05:48 +09:00
Alexey Charkov a7f53284e9 fbdev: Minor cleanup in WM8505-related code
This replaces the last remaining driver name reference with the
macro for uniformity in wm8505fb.

In addition, the error return path in wmt_ge_rops.c is made more
uniform by getting rid of goto's in remaining places.

Signed-off-by: Alexey Charkov <alchark@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-21 01:05:43 +09:00
Andres Salomon 521bc83b0f s1d13xxxfb: drop unused code
Silence warnings such as -

drivers/video/s1d13xxxfb.c:421: warning: ‘bltbit_wait_bitset’ defined but not used

Just drop the unused code.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-21 01:05:43 +09:00
Jingoo Han 4959212c18 s3c-fb: add support for runtime pm
This patch adds support for runtime pm using the functions.
 - pm_runtime_get_sync()
 - pm_runtime_put_sync()

pm_runtime_get_sync() and pm_runtime_put_sync() are called when
open or release function of framebufer driver is called to inform
the system if hardware is idle or not.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-21 01:05:43 +09:00
Paul Mundt e13416ae7f Merge branch 'for-paul-rc' of git://gitorious.org/linux-omap-dss2/linux into fbdev-fixes-for-linus
* 'for-paul-rc' of git://gitorious.org/linux-omap-dss2/linux:
  OMAP: OMAPFB: disable old omapfb for OMAP4 builds
  OMAP: DSS: VRAM: Align start & size of vram to 2M
2010-12-16 23:38:41 +09:00
Daniel Mack 364dbdf3b6 video: add driver for PXA3xx 2D graphics accelerator
This adds a driver for the the 2D graphics accelerator found on PXA3xx
processors. Only resource mapping, interrupt handling and a simple ioctl
handler is done by the kernel part, the rest of the logic is implemented
in DirectFB userspace.

Graphic applications greatly benefit for line drawing, blend, and
rectangle and triangle filling operations.

Benchmarks done on a PXA303 using the df_dok benchmarking tool follow,
where the value in square brackets show the CPU usage during that test.

Without accelerator (benchmarking 256x252 on 480x262 RGB16 (16bit)):

  Anti-aliased Text                              3.016 secs (   65.649 KChars/sec) [ 99.6%]
  Fill Rectangle                                 3.021 secs (  175.107 MPixel/sec) [ 98.0%]
  Fill Rectangle (blend)                         3.582 secs (    3.602 MPixel/sec) [ 99.7%]
  Fill Rectangles [10]                           3.177 secs (  182.753 MPixel/sec) [ 98.1%]
  Fill Rectangles [10] (blend)                  18.020 secs (    3.580 MPixel/sec) [ 98.7%]
  Fill Spans                                     3.019 secs (  145.306 MPixel/sec) [ 98.0%]
  Fill Spans (blend)                             3.616 secs (    3.568 MPixel/sec) [ 99.4%]
  Blit                                           3.074 secs (   39.874 MPixel/sec) [ 98.0%]
  Blit 180                                       3.020 secs (   32.042 MPixel/sec) [ 98.0%]
  Blit with format conversion                    3.005 secs (   19.321 MPixel/sec) [ 99.6%]
  Blit from 32bit (blend)                        4.792 secs (    2.692 MPixel/sec) [ 98.7%]

With accelerator:

  Anti-aliased Text                              3.056 secs (*  36.518 KChars/sec) [ 21.3%]
  Fill Rectangle                                 3.015 secs (* 115.543 MPixel/sec) [  8.9%]
  Fill Rectangle (blend)                         3.180 secs (*  20.286 MPixel/sec) [  1.8%]
  Fill Rectangles [10]                           3.251 secs (* 119.062 MPixel/sec) [  1.2%]
  Fill Rectangles [10] (blend)                   6.293 secs (*  20.502 MPixel/sec) [  0.3%]
  Fill Spans                                     3.051 secs (*  97.264 MPixel/sec) [ 35.7%]
  Fill Spans (blend)                             3.377 secs (*  15.282 MPixel/sec) [ 17.8%]
  Blit                                           3.046 secs (*  27.533 MPixel/sec) [  2.6%]
  Blit 180                                       3.098 secs (*  27.070 MPixel/sec) [  2.2%]
  Blit with format conversion                    3.131 secs (*  39.148 MPixel/sec) [  2.8%]
  Blit from 32bit (blend)                        3.346 secs (*  11.568 MPixel/sec) [  0.8%]

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Tested-by: Sven Neumann <s.neumann@raumfeld.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Denis Oliver Kropp <dok@directfb.org>
Cc: Sven Neumann <s.neumann@raumfeld.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-12-16 14:31:18 +08:00
Tejun Heo afe2c511fb workqueue: convert cancel_rearming_delayed_work[queue]() users to cancel_delayed_work_sync()
cancel_rearming_delayed_work[queue]() has been superceded by
cancel_delayed_work_sync() quite some time ago.  Convert all the
in-kernel users.  The conversions are completely equivalent and
trivial.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: "David S. Miller" <davem@davemloft.net>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: netdev@vger.kernel.org
Cc: Anton Vorontsov <cbou@mail.ru>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Neil Brown <neilb@suse.de>
Cc: Alex Elder <aelder@sgi.com>
Cc: xfs-masters@oss.sgi.com
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: netfilter-devel@vger.kernel.org
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: linux-nfs@vger.kernel.org
2010-12-15 10:56:11 +01:00
Tomi Valkeinen b99ddbf83c OMAP: OMAPFB: disable old omapfb for OMAP4 builds
Build fails when OMAP4 and FB_OMAP are defined:

drivers/built-in.o: In function `omapfb_do_probe':
drivers/video/omap/omapfb_main.c:1773: undefined reference to `omap2_int_ctrl'

Old omapfb does not work on OMAP4, and never will. Change the omapfb
build dependency so that old omapfb depends on OMAP1/2/3, fixing the
build for plain OMAP4 builds.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-12-15 11:17:08 +02:00
Tomi Valkeinen 4422c04bbb OMAP: DSS: VRAM: Align start & size of vram to 2M
Align the start address and size of VRAM area to 2M as per comments from
Russell King:

> > So, why SZ_2M?
>
> Firstly, that's the granularity which we allocate page tables - one
> Linux page table covers 2MB of memory.  We want to avoid creating page
> tables for the main memory mapping as that increases TLB pressure through
> the use of additional TLB entries, and more page table walks.
>
> Plus, we never used to allow the kernel's direct memory mapping to be
> mapped at anything less than section size - this restriction has since
> been lifted due to OMAP SRAM problems, but I'd rather we stuck with it
> to ensure that we have proper behaviour from all parts of the system.
>
> Secondly, we don't want to end up with lots of fragmentation at the end
> of the memory mapping as that'll reduce performance, not only by making
> the pfn_valid() search more expensive.
>
> Emsuring a minimum allocation size and alignment makes sure that the
> regions can be coalesced together into one block, and minimises run-time
> expenses.
>
> So please, 2MB, or if you object, at the _very_ _least_ 1MB.  But
> definitely not PAGE_SIZE.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
2010-12-15 11:16:08 +02:00
Joe Perches 3b80ffdef0 video: mx3fb: Use vsprintf extension %pR for struct resource
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-14 18:07:19 +09:00
Andrew Kephart e504b84805 fbdev: Fix fb_find_nearest_mode refresh comparison
Refresh rate nearness is not calculated or reset when nearest resolution
changes.

This patch resets the refresh rate differential measurement whenever a
new nearest resolution is discovered.  This fixes two error cases;
first, wherein the first mode's refresh rate differential is never
calculated and second, when the closest refresh rate from a previous
nearest resolution is erroneously preserved.

Signed-off-by: Andrew Kephart <andrew.kephart@alereon.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-14 18:03:49 +09:00
Daniel Drake 16cdd4336f lxfb: Maintain video processor palette through suspend/resume
The Geode X driver uses both of the LX's palettes, one for gamma
correction and one for colormaps.

The kernel driver currently only backs up the one used for colormaps
during suspend/resume. If you mess with gamma settings and do a
suspend/resume, colors go funny.

Fix this by backing up the video proc palette during suspend/resume,
alongside the display controller one which is already handled.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-01 18:18:56 +09:00
Caglar Akyuz 93c176f39f video: da8xx: Register IRQ as last thing in driver probing.
Following commit exposed a bug in driver:

	"fbdev: da8xx/omap-l1xx: implement double buffering"

Bug is, if interrupt handler is called before initialization is
finished, raster controller is enabled and following register
modifications causes hardware to stay in a broken state.

By looking at this one may say that proper locking is missing in
this driver, and a more proper fix should be prepared. However,
aformentioned commit causes a regression in the driver and some
fix to current one should be applied first.

Signed-off-by: Caglar Akyuz <caglar@bilkon-kontrol.com.tr>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-12-01 18:18:52 +09:00
Michael Hennerich cffd9348a3 fbdev: bfin_adv7393fb: new Blackfin ADV7393 driver
Driver for ADV7393 add-on card for multiple Blackfin boards.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-26 15:06:39 +09:00
Michael Hennerich dbcc465a3c fbdev: bf537-lq035: new Blackfin Sharp LQ035 framebuffer driver
For LCDs hooked up to BF537-STAMP boards.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-26 15:06:34 +09:00
Randy Dunlap 22a95949d0 framebuffer: fix fbcmap.c kernel-doc warning
Fix kernel-doc warning in fbcmap.c:

Warning(drivers/video/fbcmap.c:92): No description found for parameter 'flags'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-26 15:05:08 +09:00
Linus Torvalds 0b9466ccea Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  ARM: 6482/2: Fix find_next_zero_bit and related assembly
  ARM: 6490/1: MM: bugfix: initialize spinlock for init_mm.context
  ARM: avoid annoying <4>'s in printk output
  SCSI: arm fas216: fix missing ';'
  ARM: avoid marking decompressor .stack section as having contents
  ARM: 6489/1: thumb2: fix incorrect optimisation in usracc
  ARM: 6488/1: nomadik: prevent sched_clock() wraparound
  ARM: 6484/1: fix compile warning in mm/init.c
  ARM: 6473/1: Small update to ux500 specific L2 cache code
  ARM: improve compiler's ability to optimize page tables
  mx25: fix spi device registration typo
  ARM i.MX27 eukrea: Fix compilation
  ARM i.MX spi: fix compilation for i.MX21
  ARM i.MX pcm037 eet: compile fixes
  ARM i.MX: sdma is merged, so remove #ifdef SDMA_IS_MERGED
  ARM mx3fb: check for DMA engine type
  mach-pcm037_eet: Fix section mismatch for eet_init_devices()
2010-11-25 07:41:10 +09:00
Linus Torvalds e5fa506173 Merge branch 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6
* 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6:
  sisfb: delete osdef.h
  sisfb: move the CONFIG warning to sis_main.c
  sisfb: replace SiS_SetMemory with memset_io
  sisfb: remove InPort/OutPort wrappers
  sisfb: use CONFIG_FB_SIS_301/315 instead of SIS301/315H
  sisfb: delete redudant #define SIS_LINUX_KERNEL
  sisfb: delete dead SIS_XORG_XF86 code
  sisfb: delete fallback code for pci_map_rom()
  sisfb: delete obsolete PCI ROM bug workaround
  fbdev: Update documentation index file.
  lxfb: Program panel v/h sync output polarity correctly
  fbcmap: integer overflow bug
  fbcmap: cleanup white space in fb_alloc_cmap()
  MAINTAINERS: Add fbdev patchwork entry, tidy up file patterns.
  fbdev: da8xx: punt duplicated FBIO_WAITFORVSYNC define
  fbdev: sh_mobile_lcdcfb: fix bug in reconfig()
2010-11-25 06:58:56 +09:00
Uwe Kleine-König d1d73578e0 backlight: grab ops_lock before testing bd->ops
According to the comment describing ops_lock in the definition of struct
backlight_device and when comparing with other functions in backlight.c
the mutex must be hold when checking ops to be non-NULL.

Fixes a problem added by c835ee7f41 ("backlight: Add suspend/resume
support to the backlight core") in Jan 2009.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Richard Purdie <rpurdie@linux.intel.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-25 06:50:47 +09:00
Aaro Koskinen c07a1c6b0f sisfb: delete osdef.h
The file is not needed.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-24 16:03:22 +09:00
Aaro Koskinen 1f8e6eee81 sisfb: move the CONFIG warning to sis_main.c
sis_main.c is always compiled, so we can check Kconfig options there.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-24 16:03:16 +09:00
Aaro Koskinen ec49ec33e2 sisfb: replace SiS_SetMemory with memset_io
Get rid of one more wrapper.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-24 16:03:09 +09:00
Aaro Koskinen 2ad2847269 sisfb: remove InPort/OutPort wrappers
Remove register IO wrappers.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-24 16:03:03 +09:00
Aaro Koskinen f7854e5df3 sisfb: use CONFIG_FB_SIS_301/315 instead of SIS301/315H
There is no need to alias CONFIG #defines.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-24 16:02:56 +09:00
Aaro Koskinen b6c30ca613 sisfb: delete redudant #define SIS_LINUX_KERNEL
It's not needed anymore with SIS_XORG_XF86 gone.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-24 16:02:51 +09:00
Aaro Koskinen e7d828ab91 sisfb: delete dead SIS_XORG_XF86 code
Delete code for compiling the driver for X.org/XFree86. The development
has forked, so there is no point keeping this code in the tree.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-24 16:02:46 +09:00
Aaro Koskinen f3fff73594 sisfb: delete fallback code for pci_map_rom()
If pci_map_rom() fails, there is some fallback code that basically
duplicates pci_map_rom() on non-x86 platforms. No point in that.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-24 16:02:40 +09:00
Aaro Koskinen 8807236b18 sisfb: delete obsolete PCI ROM bug workaround
Delete a workaround for a PCI ROM bug that has been fixed ages ago by
the commit 761a3ac08c.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-24 16:02:32 +09:00
Russell King f6a1f2184c Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 2010-11-23 09:37:25 +00:00
Paul Mundt fe040be2fd Merge branch 'common/fbdev-mipi' of master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6 2010-11-19 17:04:25 +09:00
Magnus Damm 6722a4016d fbdev: sh_mipi_dsi: Allow LCDC board callbacks
Update the MIPI-DSI driver to make use of the
LCD panel callbacks in the LCDC platform data.

Without this patch MIPI panels cannot use board
specific LCDC callbacks to control power and/or
back light.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-19 17:02:58 +09:00
Magnus Damm deaba19018 fbdev: sh_mipi_dsi: Require two I/O resources V2
This is V2 of the MIPI-DSI two resources patch.

The second I/O resource specifies the base address
for the link hardware block. The base address for
the link hardware block seems to vary with SoC
type. Using two I/O resources to describe the
MIPI-DSI hardware allows us to support both newer
and older SoCs.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-19 17:02:50 +09:00
Magnus Damm 71b146c815 fbdev: sh_mipi_dsi: Make use of register names
Keep MIPI-DSI registers in one place instead of
using magic values together with comments.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-19 17:02:35 +09:00
Arnd Hannemann 2006920a18 fbdev: modedb: fix CEA modes
Some of the modes were missing the correct sync polarities.
This was causing a corrupt or left shifted picture on my TV.
Additionally format #35 had a wrong refresh rate and pixel clock.

This patch fixes those issues.

Signed-off-by: Arnd Hannemann <arnd@arndnet.de>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-19 16:56:54 +09:00
Arnd Bergmann 451a3c24b0 BKL: remove extraneous #include <smp_lock.h>
The big kernel lock has been removed from all these files at some point,
leaving only the #include.

Remove this too as a cleanup.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-17 08:59:32 -08:00
Daniel Drake ad913da61a lxfb: Program panel v/h sync output polarity correctly
Commit b5c26f97ec introduced some breakage for the OLPC XO-1 laptop,
differences in the output video signal after the patch caused some problems
with the XO's display controller chip.

Reviewing of that commit against the AMD Geode LX Data Book, it seems
that these bits were being set inversely. In both cases, active high
output is denoted by a value of 0. See section 6.8.3.44 of the databook
from February 2009 (Publication ID: 33234H)

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-17 14:55:46 +09:00
Dan Carpenter 1e7c780488 fbcmap: integer overflow bug
There is an integer overflow in fb_set_user_cmap() because cmap->len * 2
can wrap.  It's basically harmless.  Your terminal will be messed up
until you type reset.

This patch does three things to fix the bug.

First, it checks the return value of fb_copy_cmap() in fb_alloc_cmap().
That is enough to fix address the overflow.

Second it checks for the integer overflow in fb_set_user_cmap().

Lastly I wanted to cap "cmap->len" in fb_set_user_cmap() much lower
because it gets used to determine the size of allocation.  Unfortunately
no one knows what the limit should be.  Instead what this patch does
is makes the allocation happen with GFP_KERNEL instead of GFP_ATOMIC
and lets the kmalloc() decide what values of cmap->len are reasonable.
To do this, the patch introduces a function called fb_alloc_cmap_gfp()
which is like fb_alloc_cmap() except that it takes a GFP flag.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-17 14:55:45 +09:00
Dan Carpenter c353103de8 fbcmap: cleanup white space in fb_alloc_cmap()
checkpatch.pl and Andrew Morton both complained about the indenting in
fb_alloc_cmap()

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-17 14:55:43 +09:00
Jiri Slaby 281e660577 VIDEO: xen-fb, switch to for_each_console
Use newly added for_each_console for iterating consoles.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: virtualization@lists.osdl.org
Cc: xen-devel@lists.xensource.com
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16 12:50:17 -08:00
Lionel Debroux acc2472ed3 backlight: constify backlight_ops
backlight_device_register has been expecting a const "ops" argument, and using
it as such, since 9905a43b2d. Let's make the
remaining backlight_ops instances const.

Inspired by hunks of the grsecurity patch, updated for newer kernels.

Signed-off-by: Lionel Debroux <lionel_debroux@yahoo.fr>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-11-16 14:14:02 +01:00
Paul Mundt 27d29dc4be Merge branches 'rmobile/fbdev' and 'common/fbdev-edid' of master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6 2010-11-16 16:25:35 +09:00
Paul Mundt 936fc42831 Merge branch 'fbdev/edid' 2010-11-16 16:25:03 +09:00
Paul Mundt 96f8d864af fbdev: move udlfb out of staging.
udlfb has undergone a fair bit of cleanup recently and is effectively at
the point where it can be liberated from staging purgatory and promoted
to a real driver.

The outstanding cleanups are all minor, with some of them dependent on
drivers/video headers, so these will be done incrementally from udlfb's
new home.

Requested-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-16 14:00:24 +09:00
Arnd Hannemann cc267ec5df fbdev: sh_mobile_lcdcfb: fix bug in reconfig()
The function sh_mobile_fb_reconfig() contained a bug,
which caused the line_length to be set wrongly, if a mode
with a different X-resolution than the default one was chosen.
This caused 1080p24 mode to not work on AP4EVB.
Additionally the notifier chain was also called with the wrong
mode.

This patch fixes this, by using the X-resolution of the new
mode instead of the old one to calculate line length and
hands over the correct mode to the notifier chain.

Signed-off-by: Arnd Hannemann <arnd@arndnet.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-16 10:11:28 +09:00
Linus Torvalds fe9d1159b2 Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  i2c: Sanity checks on adapter registration
  i2c: Mark i2c_adapter.id as deprecated
  i2c: Drivers shouldn't include <linux/i2c-id.h>
  i2c: Delete unused adapter IDs
  i2c: Remove obsolete cleanup for clientdata
2010-11-15 14:03:17 -08:00
Jean Delvare dfdee5f00c i2c: Delete unused adapter IDs
Delete unused I2C adapter IDs. Special cases are:

* I2C_HW_B_RIVA was still set in driver rivafb, however no other
  driver is ever looking for this value, so we can safely remove it.
* I2C_HW_B_HDPVR is used in staging driver lirc_zilog, however no
  adapter ID is ever set to this value, so the code in question never
  runs. As the code additionally expects that I2C_HW_B_HDPVR may not
  be defined, we can delete it now and let the lirc_zilog driver
  maintainer rewrite this piece of code.

Big thanks for Hans Verkuil for doing all the hard work :)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Jarod Wilson <jarod@redhat.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
2010-11-15 22:40:38 +01:00
Linus Torvalds 7023166959 Merge branch 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6
* 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6:
  fsl-diu-fb: drop dead ioctl define
  MAINTAINERS: Add an fbdev git tree entry.
  OMAP: DSS: Fix documentation regarding 'vram' kernel parameter
  OMAP: VRAM: Fix boot-time memory allocation
  OMAP: VRAM: improve VRAM error prints
  sisfb: limit POST memory test according to PCI resource length
  fbdev: sh_mobile_lcdc: use correct number of modes, when using the default
  fbdev: sh_mobile_lcdc: use the standard CEA-861 720p timing
  fbdev: sh_mobile_hdmi: properly clean up modedb on monitor unplug
2010-11-15 08:42:07 -08:00
Sascha Hauer 1b346af2f8 ARM mx3fb: check for DMA engine type
We have two dma engines in MX3 systems: The IPU and the SDMA
engine. We have to check if we got a channel from the correct
engine before proceeding with a channel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Reviewed-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
2010-11-15 09:25:01 +01:00
Guennadi Liakhovetski 4232f60791 fbdev: sh_mobile_hdmi: add support for E-EDID parsing
Many HDMI clients implement enhanced EDID blocks, which often contain
additional supported video modes. This patch implements parsing of such
E-EDID blocks.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-15 15:01:27 +09:00
Paul Mundt d8d776f3fb Merge branch 'fbdev/edid' of master.kernel.org:/pub/scm/linux/kernel/git/lethal/fbdev-2.6 into common/fbdev-edid 2010-11-15 14:57:49 +09:00
Guennadi Liakhovetski 0ad83f6882 fbdev: when parsing E-EDID blocks, also use SVD entries
Add parsing of E-EDID SVD entries. In this first version only a few
CEA/EIA-861E modes are implemented, more can be added as needed.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-15 14:52:23 +09:00
Guennadi Liakhovetski e4105119ac fbdev: export fb_edid_add_monspecs() for modules, improve algorithm
fb_edid_add_monspecs() should also be exported for use in modules, and it
requires a dummy version for the case, when CONFIG_FB_MODE_HELPERS is not
selected. This patch also improves the algorithm by removing a redundant
memory allocation, adds function documentation, adds data verification and
replaces memmove() with memcpy().

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-15 14:52:21 +09:00
Erik Gilling 9fbbdde932 video: add fb_edid_add_monspecs for parsing extended edid information
Modern monitors/tvs have more extended EDID information blocks which can
contain extra detailed modes.  This adds a fb_edid_add_monspecs function
which drivers can use to parse those additions blocks.

Signed-off-by: Erik Gilling <konkers@android.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-15 14:52:19 +09:00
Edgar (gimli) Hucek bd760e1e5b backlight: MacBookAir3,1(3,2) mbp-nvidia-bl support
Add support for the MacBookAir3,1 and MacBookAir3,2 to the mbp-nvidia-bl
driver.

Signed-off-by: Edgar (gimli) Hucek <gimli@dark-green.com>
Acked-by: Richard Purdie <rpurdie@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-12 07:55:33 -08:00
Michael Hennerich 4f1aa84631 drivers/video/backlight/adp8860_bl.c: check strict_strtoul() return value
Handle return value, strict_strtoul is declared with attribute
warn_unused_result.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Acked-by: Richard Purdie <rpurdie@linux.intel.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-12 07:55:33 -08:00
Michael Hennerich c7ce2500e3 drivers/video/backlight/adp8860_bl.c: fix ambient light zone overwrite handling
This affects the get/set of the current Ambient Light Zone.  Reading
should return an integer between 1..3 (1 = Daylight, 2 = office, 3 =
dark).  Writing a value between 1..3 forces the backlight controller to
enter the corresponding Ambient Light Zone.  Writing 0 returns to normal
operation.

Fix valid range checking so we don't write invalid values to the
controller, and make sure we subtract 1, since this is what the register
definition (CFGR:BLV) requires.  Otherwise the values written don't work
correctly.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Richard Purdie <rpurdie@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-12 07:55:33 -08:00
Arun Murthy fef7764f8b backlight: add low threshold to pwm backlight
The intensity of the backlight can be varied from a range of
max_brightness to zero.  Though most, if not all the pwm based backlight
devices start flickering at lower brightness value.  And also for each
device there exists a brightness value below which the backlight appears
to be turned off though the value is not equal to zero.

If the range of brightness for a device is from zero to max_brightness.  A
graph is plotted for brightness Vs intensity for the pwm based backlight
device has to be a linear graph.

intensity
	  |   /
	  |  /
	  | /
	  |/
	  ---------
	 0	max_brightness

But pratically on measuring the above we note that the intensity of
backlight goes to zero(OFF) when the value in not zero almost nearing to
zero(some x%).  so the graph looks like

intensity
	  |    /
	  |   /
	  |  /
	  |  |
	  ------------
	 0   x	 max_brightness

In order to overcome this drawback knowing this x% i.e nothing but the low
threshold beyond which the backlight is off and will have no effect, the
brightness value is being offset by the low threshold value(retaining the
linearity of the graph).  Now the graph becomes

intensity
	  |     /
	  |    /
	  |   /
	  |  /
	  -------------
	   0	  max_brightness

With this for each and every digit increment in the brightness from zero
there is a change in the intensity of backlight.  Devices having this
behaviour can set the low threshold brightness(lth_brightness) and pass
the same as platform data else can have it as zero.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Arun Murthy <arun.murthy@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Richard Purdie <rpurdie@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-12 07:55:33 -08:00
Axel Lin a1025e224c drivers/video/backlight/s6e63m0.c: fix section mismatch
Eliminate section mismatch warning by marking s6e63m0_probe() as __devinit.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Richard Purdie <rpurdie@linux.intel.com>
Cc: InKi Dae <inki.dae@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-12 07:55:33 -08:00
Axel Lin d974e00b95 drivers/video/backlight/s6e63m0.c: unregister backlight device and remove sysfs attribute file in s6e63m0_remove
s6e63m0_probe() registered backlight device and create sysfs attribute
files, thus s6e63m0_remove() should unregister backlight device and remove
sysfs attribute files.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Richard Purdie <rpurdie@linux.intel.com>
Cc: InKi Dae <inki.dae@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-12 07:55:33 -08:00
Marek Vasut 4dbdf8861a backlight: fix blanking for L4F00242T03 LCD
The LCD was turned on if the variable power was > 0, but that was
incorrect.  The LCD has to be turned on in NORMAL and UNBLANK case.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-12 07:55:33 -08:00
Marek Vasut 6bde9082c5 backlight: fix blanking for LMS283GF05 LCD
The LCD was turned on if the variable power was > 0, but that was
incorrect.  The LCD has to be turned on in NORMAL and UNBLANK case.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-12 07:55:33 -08:00
Axel Lin ed3a6787bf drivers/video/backlight/s6e63m0.c: set permissions on gamma_table file to 0444
gamma_table is not writable, so set permissions to 0444.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Richard Purdie <rpurdie@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-12 07:55:33 -08:00
Tomi Valkeinen 88abf44d3d OMAP: VRAM: Fix boot-time memory allocation
Use memblock_free() and memblock_remove() to remove the allocated or
reserved VRAM area from normal kernel memory.

This is a slightly modified version of patches from Felipe Contreras and
Namhyung Kim.

Reported-by: Felipe Contreras <felipe.contreras@gmail.com>
Reported-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-10 20:51:13 +09:00
Tomi Valkeinen 108409a8a4 OMAP: VRAM: improve VRAM error prints
Improve the error prints to give more information about the offending
address & size.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-10 20:51:13 +09:00
Aaro Koskinen 32ed3036c5 sisfb: limit POST memory test according to PCI resource length
If the POST memory test fails, the driver may access illegal
memory areas. Instead of hard coding the maximum size, set it
according to the PCI resource length (an additional check is needed in
sisfb_post_map_vram() to ensure it's big enough). DRAM sizing will later
adjust video_size to the correct value.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-10 20:26:37 +09:00
Paul Mundt 12ddf37444 Merge branch 'common/fbdev' of master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6 2010-11-10 18:34:49 +09:00
Paul Mundt c724d07a56 fbdev: sh_mobile_hdmi: fix up compiler warnings.
CC      drivers/video/sh_mobile_hdmi.o
drivers/video/sh_mobile_hdmi.c: In function 'sh_hdmi_avi_infoframe_setup':
drivers/video/sh_mobile_hdmi.c:539: warning: unused variable 'var'
drivers/video/sh_mobile_hdmi.c: In function 'sh_hdmi_clk_configure':
drivers/video/sh_mobile_hdmi.c:1021: warning: unused variable 'pdata'

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-10 17:54:20 +09:00
Paul Mundt 830539d143 fbdev: sh_mobile_lcdcfb: fix up compiler warnings.
CC      drivers/video/sh_mobile_lcdcfb.o
drivers/video/sh_mobile_lcdcfb.c: In function 'sh_mobile_check_var':
drivers/video/sh_mobile_lcdcfb.c:922: warning: format '%u' expects type 'unsigned int', but argument 11 has type 'long unsigned int'

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-10 17:51:44 +09:00
Guennadi Liakhovetski 0ea2af1c15 fbdev: sh_mobile_hdmi: add support for 1080p modes
Add support for 3 more preprogrammed video modes: 1080p at 24, 50, and 60Hz.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-10 17:29:27 +09:00
Guennadi Liakhovetski d2ecbab596 fbdev: sh_mobile_lcdc: increase maximum framebuffer size to support 1080p
LCDC hardware can support 1920x1080 formats, adjust the driver to cover them.
Besides, instead of guessing some "reasonable" validity checks, only verify
values in .fb_check_var(), that we are sure, we cannot support.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-10 17:24:09 +09:00
Guennadi Liakhovetski 8c183ecee2 fbdev: sh_mobile_hdmi: improve support for more video modes
Configure pre-programmed VIC modes for VGA (640x480@60) and 720x576@50
modes, change PHY mode selection to be based on pixel clock frequency.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-10 17:23:59 +09:00
Guennadi Liakhovetski c36940e678 fbdev: sh_mobile_hdmi: add support for more precise HDMI clock configuration
The HDMI clock has to be reconfigured for different video modes. However, the
precision of the supplying SoC clock on SH-Mobile systems is often
insufficient. This patch allows to additionally reconfigure the parent clock
to achieve the optimal HDMI clock frequency, in case this is supported by the
platform.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-10 17:23:54 +09:00
Guennadi Liakhovetski 5fd284e6cd fbdev: sh_mobile_lcdc: use correct number of modes, when using the default
Fix zero mode number, when using the default 720p mode.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-10 16:53:21 +09:00
Guennadi Liakhovetski 5ae0cf82df fbdev: sh_mobile_lcdc: use the standard CEA-861 720p timing
sh_mobile_lcdcfb.c has a hard-coded 720p video mode, used as default, if none
is explicitly specified by the platform. Adjust its timing to match the CEA
standard. Also add an explicit refresh rate value, which is needed, when used
with HDMI, to be able to recognise the default 720p mode as a pre-programmed
VIC #4.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-10 16:53:17 +09:00
Guennadi Liakhovetski 91d63f8a30 fbdev: sh_mobile_hdmi: properly clean up modedb on monitor unplug
Even though this is not a problem currently, it is better to clear the freed
pointer and nullify the length of the freed memory.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-10 16:53:12 +09:00
Paul Mundt dc7c0b6a6d Merge branch 'viafb-next' of git://github.com/schandinat/linux-2.6 2010-11-10 12:04:41 +09:00
Daniel Drake b884a94ed1 viafb: Add OLPC XO-1.5 port configs
The OLPC XO-1.5 does not use the standard port wiring suggested
in the viafb driver.

This is required for the upcoming OLPC DCON and via-camera drivers,
to be submitted soon.

Signed-off-by: Daniel Drake <dsd@laptop.org>
[fts: removed useless ifdef's and corrected comment]
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2010-11-09 16:38:09 +00:00
Jonathan Corbet 67eb6f9617 viafb: suspend/resume for GPIOs
Be sure to re-enable GPIO lines on resume.  Users still have to
be sure to set them properly.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2010-11-09 16:18:29 +00:00
Daniel Drake 751305d9b2 viafb: General power management infrastructure
Multiple devices need S/R hooks (framebuffer, GPIO, camera).
Add infrastructure and convert existing framebuffer code to the new
model.

This patch should create no functional change.
Based on earlier work by Jonathan Corbet.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
2010-11-09 16:17:02 +00:00
Alexey Charkov d6ff7d0fe2 ARM: Add support for the display controllers in VT8500 and WM8505
This adds drivers for the LCD controller found in VIA VT8500 SoC,
GOVR display controller found in WonderMedia WM8505 SoC and for the
Graphics Engine present in both of them that provides hardware
accelerated raster operations (used for copyarea and fillrect).

Signed-off-by: Alexey Charkov <alchark@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-11-09 18:52:07 +09:00
Uwe Kleine-König b595076a18 tree-wide: fix comment/printk typos
"gadget", "through", "command", "maintain", "maintain", "controller", "address",
"between", "initiali[zs]e", "instead", "function", "select", "already",
"equal", "access", "management", "hierarchy", "registration", "interest",
"relative", "memory", "offset", "already",

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-11-01 15:38:34 -04:00
Linus Torvalds 706d4b12f8 Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (215 commits)
  ARM: memblock: setup lowmem mappings using memblock
  ARM: memblock: move meminfo into find_limits directly
  ARM: memblock: convert free_highpages() to use memblock
  ARM: move freeing of highmem pages out of mem_init()
  ARM: memblock: convert memory detail printing to use memblock
  ARM: memblock: use memblock to free memory into arm_bootmem_init()
  ARM: memblock: use memblock when initializing memory allocators
  ARM: ensure membank array is always sorted
  ARM: 6466/1: implement flush_icache_all for the rest of the CPUs
  ARM: 6464/2: fix spinlock recursion in adjust_pte()
  ARM: fix memblock breakage
  ARM: 6465/1: Fix data abort accessing proc_info from __lookup_processor_type
  ARM: 6460/1: ixp2000: fix type of ixp2000_timer_interrupt
  ARM: 6449/1: Fix for compiler warning of uninitialized variable.
  ARM: 6445/1: fixup TCM memory types
  ARM: imx: Add wake functionality to GPIO
  ARM: mx5: Add gpio-keys to mx51 babbage board
  ARM: imx: Add gpio-keys to plat-mxc
  mx31_3ds: Fix spi registration
  mx31_3ds: Fix the logic for detecting the debug board
  ...
2010-10-30 08:26:25 -07:00
Linus Torvalds c0f62edd40 Merge branches 'msm-fixes' and 'msm-video' of git://codeaurora.org/quic/kernel/dwalker/linux-msm
* 'msm-fixes' of git://codeaurora.org/quic/kernel/dwalker/linux-msm:
  msm: Kconfig: drop unused config options
  msm: fix compile failure when no debug uart is selected
  msm: fix debug-macro.S build failure
  msm: timer: Decrease shift on timer clocksource
  arm: mach-msm: fix error handling in msm_iommu_probe()
  msm: fix Kconfig target board selection
  msm: fix compile failure on struct membank node member

* 'msm-video' of git://codeaurora.org/quic/kernel/dwalker/linux-msm:
  drivers/video/msm/mddi.c: Remove multiple KERN_<level> uses
  drivers: msm: video: add dev_set_name call
  drivers: video: msm: fix hang on disable_irq
2010-10-29 18:57:04 -07:00
Linus Torvalds 18cb657ca1 Merge branch 'stable/xen-pcifront-0.8.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
and branch 'for-linus' of git://xenbits.xen.org/people/sstabellini/linux-pvhvm

* 'for-linus' of git://xenbits.xen.org/people/sstabellini/linux-pvhvm:
  xen: register xen pci notifier
  xen: initialize cpu masks for pv guests in xen_smp_init
  xen: add a missing #include to arch/x86/pci/xen.c
  xen: mask the MTRR feature from the cpuid
  xen: make hvc_xen console work for dom0.
  xen: add the direct mapping area for ISA bus access
  xen: Initialize xenbus for dom0.
  xen: use vcpu_ops to setup cpu masks
  xen: map a dummy page for local apic and ioapic in xen_set_fixmap
  xen: remap MSIs into pirqs when running as initial domain
  xen: remap GSIs as pirqs when running as initial domain
  xen: introduce XEN_DOM0 as a silent option
  xen: map MSIs into pirqs
  xen: support GSI -> pirq remapping in PV on HVM guests
  xen: add xen hvm acpi_register_gsi variant
  acpi: use indirect call to register gsi in different modes
  xen: implement xen_hvm_register_pirq
  xen: get the maximum number of pirqs from xen
  xen: support pirq != irq

* 'stable/xen-pcifront-0.8.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: (27 commits)
  X86/PCI: Remove the dependency on isapnp_disable.
  xen: Update Makefile with CONFIG_BLOCK dependency for biomerge.c
  MAINTAINERS: Add myself to the Xen Hypervisor Interface and remove Chris Wright.
  x86: xen: Sanitse irq handling (part two)
  swiotlb-xen: On x86-32 builts, select SWIOTLB instead of depending on it.
  MAINTAINERS: Add myself for Xen PCI and Xen SWIOTLB maintainer.
  xen/pci: Request ACS when Xen-SWIOTLB is activated.
  xen-pcifront: Xen PCI frontend driver.
  xenbus: prevent warnings on unhandled enumeration values
  xenbus: Xen paravirtualised PCI hotplug support.
  xen/x86/PCI: Add support for the Xen PCI subsystem
  x86: Introduce x86_msi_ops
  msi: Introduce default_[teardown|setup]_msi_irqs with fallback.
  x86/PCI: Export pci_walk_bus function.
  x86/PCI: make sure _PAGE_IOMAP it set on pci mappings
  x86/PCI: Clean up pci_cache_line_size
  xen: fix shared irq device passthrough
  xen: Provide a variant of xen_poll_irq with timeout.
  xen: Find an unbound irq number in reverse order (high to low).
  xen: statically initialize cpu_evtchn_mask_p
  ...

Fix up trivial conflicts in drivers/pci/Makefile
2010-10-28 17:11:17 -07:00
Russell King b3773301c4 Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/genesis-2.6 into devel-stable
Conflicts:
	drivers/video/sh_mobile_hdmi.c
2010-10-28 20:14:38 +01:00
Linus Torvalds 0851668fdd Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (505 commits)
  [media] af9015: Fix max I2C message size when used with tda18271
  [media] IR: initialize ir_raw_event in few more drivers
  [media] Guard a divide in v4l1 compat layer
  [media] imon: fix nomouse modprobe option
  [media] imon: remove redundant change_protocol call
  [media] imon: fix my egregious brown paper bag w/rdev/idev split
  [media] cafe_ccic: Configure ov7670 correctly
  [media] ov7670: allow configuration of image size, clock speed, and I/O method
  [media] af9015: support for DigitalNow TinyTwin v3 [1f4d:9016]
  [media] af9015: map DigitalNow TinyTwin v2 remote
  [media] DigitalNow TinyTwin remote controller
  [media] af9015: RC fixes and improvements
  videodev2.h.xml: Update to reflect the latest changes at videodev2.h
  [media] v4l: document new Bayer and monochrome pixel formats
  [media] DocBook/v4l: Add missing formats used on gspca cpia1 and sn9c2028
  [media] firedtv: add parameter to fake ca_system_ids in CA_INFO
  [media] tm6000: fix a macro coding style issue
  tm6000: Remove some ugly debug code
  [media] Nova-S-Plus audio line input
  [media] [RFC,1/1] V4L2: Use new CAP bits in existing RDS capable drivers
  ...
2010-10-28 09:35:11 -07:00
Linus Torvalds 9ae6d03922 Merge branch 'viafb-next' of git://github.com/schandinat/linux-2.6
* 'viafb-next' of git://github.com/schandinat/linux-2.6: (29 commits)
  viafb: add initial VX900 support
  viafb: fix hardware acceleration for suspend & resume
  viafb: make suspend and resume work (on all machines?)
  viafb: restore display on resume
  Minimal support for viafb suspend/resume
  viafb: use proper register for colour when doing fill ops
  viafb: add documentation for proc interface
  viafb: rename output devices
  viafb: add a mapping of supported output devices
  viafb: set sync polarity for all output devices
  viafb: add function to change sync polarity per device
  viafb: reduce I2C timeout and delay
  viafb: enable I2C for CRT
  viafb: fix i2c_transfer error handling
  viafb: vt1636 cleanup
  viafb: introduce per output device power management
  viafb: limit LCD code impact
  viafb: add interface for output device configuration
  viafb: merge the remaining output path with enable functions
  viafb: use new device routing
  ...
2010-10-27 19:02:41 -07:00
Nicolas Kaiser b4754ebc31 drivers/video/omap/blizzard.c: suspected typo in assignment
Untested, but looks like an obvious typo to me.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Cc: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-27 18:03:08 -07:00
Julia Lawall f35691062a drivers/video/gbefb.c: eliminate memory leak
This code is preceded by a call to framebuffer_alloc, which allocates
memory, so this memory should be freed before leaving the function in an
error case.  out_release_framebuffer just frees the frame buffer and
returns.

A simplified version of the semantic match that finds this problem is:
(http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
local idexpression x;
expression E;
identifier f1;
iterator I;
@@

x = framebuffer_alloc(...);
<... when != x
     when != true (x == NULL || ...)
     when != if (...) { <+...x...+> }
     when != I (...) { <+...x...+> }
(
 x == NULL
|
 x == E
|
 x->f1
)
...>
* return ...;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-27 18:03:08 -07:00
James Hogan f11b478d46 fbmem: fix fb_read, fb_write unaligned accesses
fb_{read,write} access the framebuffer using lots of fb_{read,write}l's
but don't check that the file position is aligned which can cause problems
on some architectures which do not support unaligned accesses.

Since the operations are essentially memcpy_{from,to}io, new
fb_memcpy_{from,to}fb macros have been defined and these are used instead.

For Sparc, fb_{read,write} macros use sbus_{read,write}, so this defines
new sbus_memcpy_{from,to}io functions the same as memcpy_{from,to}io but
using sbus_{read,write}b instead of {read,write}b.

Signed-off-by: James Hogan <james@albanarts.com>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-27 18:03:08 -07:00
James Hogan c9c62dce35 fbmem: fix whitespace
Change a few lines of indentation to tabs.

Signed-off-by: James Hogan <james@albanarts.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-27 18:03:08 -07:00
Julia Lawall 847fb8aca3 drivers/video/matrox/matroxfb_maven.c: fix unsigned return type
The function has an unsigned return type, but returns a negative constant
to indicate an error condition.  The result of calling the function is
only tested by comparison to 0, and thus unsigned is not needed and can be
dropped from the return type.

A sematic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@exists@
identifier f;
constant C;
@@

 unsigned f(...)
 { <+...
*  return -C;
 ...+> }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-27 18:03:08 -07:00
Ondrej Zary f0a2f357d4 savagefb: fix DDC for Savage 4
I tested savagefb on 3 different Savage 4 cards:
Diamond Stealth III S520
Number Nine SR9
Datapath Horizon 2S (two savage chips on a PCI card)

it worked except the DDC which did not work on any of them.

Looking at the BIOS code, it does not use MMIO register 0xff20 but CRT
register 0xa0 or 0xb1 - depending on the chip revision and something in
register 0xa6.  With this patch, DDC works fine on all 3 cards (even on
the second head of Horizon 2S - although it does not display anything as
it's misconfigured because of missing BIOS).

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-27 18:03:08 -07:00
Christian Dietrich 09b599ddd4 drivers/video/matrox/matroxfb_DAC1064.c: remove undead ifdef CONFIG_FB_MATROX_G
The CONFIG_FB_MATROX_G ifdef isn't necessary at this point, because it is
checked in an outer ifdef level already and has no effect here.

Signed-off-by: Christian Dietrich <qy03fugy@stud.informatik.uni-erlangen.de>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-27 18:03:07 -07:00
Joe Perches 17f52ed735 drivers/video/msm/mddi.c: Remove multiple KERN_<level> uses
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-10-27 13:43:21 -07:00
Linus Torvalds c48c43e422 Merge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (476 commits)
  vmwgfx: Implement a proper GMR eviction mechanism
  drm/radeon/kms: fix r6xx/7xx 1D tiling CS checker v2
  drm/radeon/kms: properly compute group_size on 6xx/7xx
  drm/radeon/kms: fix 2D tile height alignment in the r600 CS checker
  drm/radeon/kms/evergreen: set the clear state to the blit state
  drm/radeon/kms: don't poll dac load detect.
  gpu: Add Intel GMA500(Poulsbo) Stub Driver
  drm/radeon/kms: MC vram map needs to be >= pci aperture size
  drm/radeon/kms: implement display watermark support for evergreen
  drm/radeon/kms/evergreen: add some additional safe regs v2
  drm/radeon/r600: fix tiling issues in CS checker.
  drm/i915: Move gpu_write_list to per-ring
  drm/i915: Invalidate the to-ring, flush the old-ring when updating domains
  drm/i915/ringbuffer: Write the value passed in to the tail register
  agp/intel: Restore valid PTE bit for Sandybridge after bdd3072
  drm/i915: Fix flushing regression from 9af90d19f
  drm/i915/sdvo: Remove unused encoding member
  i915: enable AVI infoframe for intel_hdmi.c [v4]
  drm/i915: Fix current fb blocking for page flip
  drm/i915: IS_IRONLAKE is synonymous with gen == 5
  ...

Fix up conflicts in
 - drivers/gpu/drm/i915/{i915_gem.c, i915/intel_overlay.c}: due to the
   new simplified stack-based kmap_atomic() interface
 - drivers/gpu/drm/vmwgfx/vmwgfx_drv.c: added .llseek entry due to BKL
   removal cleanups.
2010-10-26 18:57:59 -07:00
Hagen Paul Pfeifer 732eacc054 replace nested max/min macros with {max,min}3 macro
Use the new {max,min}3 macros to save some cycles and bytes on the stack.
This patch substitutes trivial nested macros with their counterpart.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
Cc: Joe Perches <joe@perches.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Roland Dreier <rolandd@cisco.com>
Cc: Sean Hefty <sean.hefty@intel.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:12 -07:00