Commit graph

2969 commits

Author SHA1 Message Date
Jani Nikula 0f45bddf04 OMAP: DSS2: Taal: Print panel name in addition to revision
The driver will support other panels in addition to Taal, print also the
name.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:49 +03:00
Jani Nikula e7f6c3f2fb OMAP: DSS2: Taal: Add panel specific configuration structure
Add a structure for panel specific configration to be able to support
more than one panel in the future.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:49 +03:00
Jani Nikula 448dfe9680 OMAP: DSS2: Taal: Configure ESD check in DSI panel data
Make ESD check usage configurable in DSI panel data, as opposed to a
define.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:49 +03:00
Tomi Valkeinen 8d3573c88a OMAP: DSS2: Taal: Use Nokia DSI panel data
Get board specific information from the Nokia DSI panel data structure
instead of the DSS.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:48 +03:00
Jani Nikula 7ae2fb1192 OMAP: DSS2: Taal: Add proper external TE support
Add gpio irq based external TE support with timeout.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:48 +03:00
Jani Nikula d2b6578738 OMAP: DSS2: Taal: Change probe error handling labels
Switch from numbered to named labels to make it easier to add new
labels for error handling.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:48 +03:00
Jani Nikula 4571a023f5 OMAP: DSS2: Taal: Change ESD work management
Move ESD work queuing and cancelling out of taal_power_on/off() to avoid
problems related to taal_esd_work() calling the power on/off functions.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:48 +03:00
Jani Nikula fed44b7af8 OMAP: DSS2: Taal: Check taal_power_on() return value in taal_resume()
Change state only if power on was succesful.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:48 +03:00
Jani Nikula 2c2fc15124 OMAP: DSS2: Taal: Change DSI bus locking to avoid deadlock in ESD work
Move dsi_bus_lock/unlock() out of taal_power_on/off() to avoid deadlock
in taal_esd_work().

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:48 +03:00
Jani Nikula ee52c0ae68 OMAP: DSS2: Taal: Ensure panel is enabled in enable_te() and run_test()
Bail out from taal_enable_te() and taal_run_test() if panel is not
enabled.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:48 +03:00
Jani Nikula f2a8b75c13 OMAP: DSS2: Taal: Improve taal_power_on() error handling
Check return values and bail out on errors.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:48 +03:00
Jani Nikula d803bb6e68 OMAP: DSS2: Taal: Remove ESD work cancel from driver probe error handling
ESD work is never queued in probe, no need to cancel it on probe error.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:47 +03:00
Jani Nikula 2f1e5f606a OMAP: DSS2: Taal: Fix request_irq() error handling
Separate gpio_request() and request_irq() error handling.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:47 +03:00
Jani Nikula 75392bfe3e OMAP: DSS2: Taal: Remove platform enable/disable
After the addition of proper hardware reset, taal_hw_reset(), there's no
need for an additional platform enable/disable. Remove them.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:47 +03:00
Jani Nikula 6b316715b4 OMAP: DSS2: Taal: Add locks to protect taal data access
Avoid potential race conditions in sysfs access to taal data.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:47 +03:00
Jani Nikula 006db7b430 OMAP: DSS2: Taal: Add panel hardware reset
Issue a proper reset pulse on the reset line instead of just doing power
on/off.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:47 +03:00
Tomi Valkeinen 1cbc8703e1 OMAP: DSS2: Taal: add locks to taal_bl_update_status
taal_bl_update_status was missing locks to protect taal_data. This caused
a kernel crash randomly, as the code attempted to set the brightness while
the OMAP's DSI block was actually disabled.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:47 +03:00
Tomi Valkeinen 4ffa35713e OMAP: DSS2: DSI: change DSI timeout functions
Using nanoseconds as arguments to functions that set the DSI timeouts was
perhaps not so good idea. The timeouts are based on different DSI clocks,
so the possible range for the timeouts vary greatly depending on the
clocks. Also, the multipliers used with the timeouts cause big gaps in the
timeout range, meaning that the nanosecond based functions could cause the
timeout to be quite far from the intended value.

This patch changes the functions to take the plain tick values with the
multiplier enable/disable bits, and sets the TA/LP_RX/HS_TX timeouts to
maximum. While the timeouts could be much lower, the fact is that when
TA/LP_RX/HS_TX timeout happens, we are in an error situation and not in a
hurry anyway.

STOP_STATE_COUNTER is a different matter, but it is only used at
initialization time, and won't normally affect the performance.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:47 +03:00
Tomi Valkeinen b63ac1e314 OMAP: DSS2: DSI: handle error in synchronous write
Check if the peripheral answered something, and if so, dump the data
and return an error.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:47 +03:00
Tomi Valkeinen 0c244f770f OMAP: DSS2: DSI: change dsi_vc_dcs_read_2 parameters
Change dsi_vc_dcs_read_2() data parameter to two u8 parameters to make the
byte-order clear.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:47 +03:00
Tomi Valkeinen 0f16aa0ae6 OMAP: DSS2: DSI: use a private workqueue
Using the shared workqueue led to to a deadlock in the case where the
display was unblanked via keyboard.

What happens is something like this:

- User presses a key

context 1:
- drivers/char/keyboard.c calls schedule_console_callback()
- fb_unblank takes the console semaphore
- dsi bus lock is taken, and frame transfer is started (dsi bus lock is
  left on)
- Unblank code tries to set the panel backlight, which tries to take dsi
  bus lock, but is blocked while the frame transfer is going on

context 2, shared workqueue, console_callback in drivers/char/vt.c:
- Tries to take console semaphore
- Blocks, as console semaphore is being held by context 1
- No other shared workqueue work can be run

context 3, HW irq, caused by FRAMEDONE interrupt:
- Interrupt handler schedules framedone-work in shared workqueue
- Framedone-work is never ran, as the shared workqueue is blocked. This
  means that the unblank thread stays blocked, which means that context 2
  stays blocked.

While I think the real problem is in keyboard/virtual terminal code, using
a private workqueue in the DSI driver is perhaps safer and more robust
than using the shared one. The DSI works should not be delayed more than a
millisecond or so, and even if the private workqueue gives us no hard
promise of doing so, it's still safer bet than the shared workqueue.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:46 +03:00
Tomi Valkeinen 86a7867ebf OMAP: DSS2: DSI: print errors in dsi_vc_flush_receive_data()
dsi_vc_flush_receive_data() is meant to dump data when something has gone
wrong, and thus we should use DSSERR, not DSSDBG.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:46 +03:00
Ville Syrjälä 1ceafc0091 OMAP: DSS2: OMAPFB: Add some locking debug checks
Trigger WARN_ON() messages from various places in the code in case the
memory region is not currently locked.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:46 +03:00
Ville Syrjälä 3d84b65aa6 OMAP: DSS2: OMAPFB: Make lockdep happy
When more than one memory region needs to be lockd at the same time use
the memory region id to fix the order in which the locks are taken. Also
one needs to use the _nested() versions of the locking primitives. The
memory region id can serve as the lock class there as well.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:46 +03:00
Ville Syrjälä 2f642a1750 OMAP: DSS2: OMAPFB: Convert the memory region locking to rwsem
R/W semaphore is a good fit for the memory region locking pattern.
So use it.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:46 +03:00
Ville Syrjälä 430571d59a OMAP: DSS2: OMAPFB: Add locking for memory regions
Add locking to the memory regions to make sure the memory region size
won't be changed while some other piece of code is performing some
checks or setup based on that information.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:46 +03:00
Ville Syrjälä 078ff546a8 OMAP: DSS2: OMAPFB: Add support for switching memory regions
Separate the memory region from the framebuffer device a little bit.
It's now possible to select the memory region used by the framebuffer
device using the new mem_idx parameter of omapfb_plane_info. If the
mem_idx is specified it will be interpreted as an index into the
memory regions array, if it's not specified the framebuffer's index is
used instead. So by default each framebuffer keeps using it's own
memory region which preserves backwards compatibility.

This allows cloning the same memory region to several overlays and yet
each overlay can be controlled independently since they can be
associated with separate framebuffer devices.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:46 +03:00
Ville Syrjälä 2ad0c50b84 OMAP: DSS2: OMAPFB: Skip unnecessary set_overlay_info()
In omapfb_enable_overlay() if the overlay state is already what we want
skip the set_overlay_info().

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:46 +03:00
Ville Syrjälä 276a1d4337 OMAP: DSS2: OMAPFB: Check var even if there isn't memory
If video memory hasn't been allocate have check_fb_var() still check
most of the settings, just skip the ones involving the size of the
memory region. Also skip the memory address calculations in
omapfb_setup_overlay() if there's no memory.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:46 +03:00
Ville Syrjälä 46d3524a1b OMAP: DSS2: OMAPFB: Refactor overlay address calculations
Split the overlay address calculations into their own function.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:45 +03:00
Tomi Valkeinen 8cab90fdb4 OMAP: DSS2: Fix update area calculations with multiple scaled overlays
When there are multiple scaled overlays simply checking whether the update
area intersects any of them in order is not enough. If eg. VID1 starts out
completely outside the update area but VID2 causes the update area to
increase in such a way that VID1 now falls partially within the increased
update area VID1 should be rechecked and the update area possibly
increased even further to fully encompass VID1. So simply keep looping
over the overlays until such time that none of the overlays caused the
update area to change.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:45 +03:00
Ville Syrjälä 75c7d59daf OMAP: DSS2: clear spurious SYNC_LOST_DIGIT interrupts
When DSS transitions from off mode to on VENC may generate a spurious
SYNC_LOST_DIGIT error. Just ack it when restoring the context. Also
restore IRQENABLE last to avoid triggering interrupts before the
context is fully restored.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:45 +03:00
Ville Syrjälä a74b260502 OMAP: DSS2: Make wait_for_go() succeed for disabled displays
When the display is not active make the wait_for_go() functions return
immediately.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:45 +03:00
Ville Syrjälä 825f50b1a4 OMAP: DSS2: Check if display supports update mode changes
Check whether the display actually has the set_update_mode() function
before calling it. Only the sysfs codepath was broken, the omapfb ioctl
had the necessary protection.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:45 +03:00
Tomi Valkeinen 5ab8e30c18 OMAP: DSS2: DSI: Increase HS TX timeout
For some reason screen updates of certain odd widths seem to be triggering
HS TX timeouts on OMAP 3430, even if bigger updates do not. The reason for
this is unknown, but increasing the timeout removes the problem with no
(so far) noticeable problems. I haven't seen this problem on OMAP 3630.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-03 15:18:45 +03:00
Julia Lawall 5c79b496a7 V4L/DVB: drivers/video/omap2/displays: add missing mutex_unlock
Add a mutex_unlock missing on the error paths.  The use of the mutex is
balanced elsewhere in the file.

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

// <smpl>
@@
expression E1;
@@

* mutex_lock(E1,...);
  <+... when != E1
  if (...) {
    ... when != E1
*   return ...;
  }
  ...+>
* mutex_unlock(E1,...);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02 16:42:59 -03:00
Tony Lindgren 055a1b8c99 Merge branch 'devel-misc' into omap-for-linus 2010-08-02 14:23:38 +03:00
Adrian Alonso 652078bac5 of/xilinxfb: update tft compatible versions
* Add tft display module compatibility for new
  hardware modules

Signed-off-by: Adrian Alonso <aalonso00@gmail.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-08-01 17:06:44 -06:00
Anatolij Gustschin 8b856f040c powerpc/fsl-diu-fb: Support setting display mode using EDID
Adds support for encoding display mode information
in the device tree using verbatim EDID block.

If the EDID entry in the DIU node is present, the
driver will build mode database using EDID data
and allow setting the display modes from this database.
Otherwise display mode will be set using mode
entries from driver's internal database as usual.

This patch also updates device tree bindings.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-08-01 17:06:44 -06:00
Anatolij Gustschin 4b5006ec7b powerpc/5121: shared DIU framebuffer support
MPC5121 DIU configuration/setup as initialized by the boot
loader currently will get lost while booting Linux. As a
result displaying the boot splash is not possible through
the boot process.

To prevent this we reserve configured DIU frame buffer
address range while booting and preserve AOI descriptor
and gamma table so that DIU continues displaying through
the whole boot process. On first open from user space
DIU frame buffer driver releases the reserved frame
buffer area and continues to operate as usual.

Signed-off-by: John Rigby <jcrigby@gmail.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-08-01 17:06:44 -06:00
Anatolij Gustschin 0814a979a6 powerpc/5121: move fsl-diu-fb.h to include/linux
Some DIU structures will be used in platform code in
subsequent MPC5121 DIU patch, so we move this header
to be able to include it elsewhere.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-08-01 17:06:44 -06:00
Anatolij Gustschin 0d9dab39fb powerpc/5121: fsl-diu-fb: fix issue with re-enabling DIU area descriptor
On MPC5121e Rev 2.0 re-configuring the DIU area descriptor
by writing new descriptor address doesn't always work.
As a result, DIU continues to display using old area descriptor
even if the new one has been written to the descriptor register of
the plane.

Add the code from Freescale MPC5121EADS BSP for writing descriptor
addresses properly. This fixes the problem for Rev 2.0 silicon.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-08-01 17:06:44 -06:00
Grant Likely 22ae782f86 of/address: Clean up function declarations
This patch moves the declaration of of_get_address(), of_get_pci_address(),
and of_pci_address_to_resource() out of arch code and into the common
linux/of_address header file.

This patch also fixes some of the asm/prom.h ordering issues.  It still
includes some header files that it ideally shouldn't be, but at least the
ordering is consistent now so that of_* overrides work.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-08-01 01:42:42 -06:00
Russell King 7b70c4275f Merge branch 'devel-stable' into devel
Conflicts:
	arch/arm/kernel/entry-armv.S
	arch/arm/kernel/setup.c
	arch/arm/mm/init.c
2010-07-31 14:20:16 +01:00
Russell King b31fc7af78 Merge branches 'at91', 'ep93xx', 'kexec', 'iop', 'lmb', 'nomadik', 'nuc', 'pl', 'spear' and 'versatile' into devel 2010-07-31 14:19:35 +01:00
Linus Torvalds a63ecd835f Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  cyber2000fb: fix console in truecolor modes
  cyber2000fb: fix machine hang on module load
  SA1111: Eliminate use after free
  ARM: Fix Versatile/Realview/VExpress MMC card detection sense
  ARM: 6279/1: highmem: fix SMP preemption bug in kmap_high_l1_vipt
  ARM: Add barriers to io{read,write}{8,16,32} accessors as well
  ARM: 6273/1: Add barriers to the I/O accessors if ARM_DMA_MEM_BUFFERABLE
  ARM: 6272/1: Convert L2x0 to use the IO relaxed operations
  ARM: 6271/1: Introduce *_relaxed() I/O accessors
  ARM: 6275/1: ux500: don't use writeb() in uncompress.h
  ARM: 6270/1: clean files in arch/arm/boot/compressed/
  ARM: Fix csum_partial_copy_from_user()
2010-07-30 19:02:51 -07:00
Ondrej Zary e76df4d339 cyber2000fb: fix console in truecolor modes
Return value was not set to 0 in setcolreg() with truecolor modes. This causes
fb_set_cmap() to abort after first color, resulting in blank palette - and
blank console in 24bpp and 32bpp modes.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-07-30 23:29:33 +01:00
Ondrej Zary 00b4703f03 cyber2000fb: fix machine hang on module load
I was testing two CyberPro 2000 based PCI cards on x86 and the machine always
hanged completely when the cyber2000fb module was loaded. It seems that the
card hangs when some registers are accessed too quickly after writing RAMDAC
control register. With this patch, both card work.

Add delay after RAMDAC control register write to prevent hangs on module load.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-07-30 23:29:33 +01:00
Russell King d50f58bbd9 Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel-stable 2010-07-29 15:48:37 +01:00
Russell King 98864ff58d ARM: OMAP: Convert OMAPFB and VRAM SDRAM reservation to LMB
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-07-27 08:48:23 +01:00
Ralf Baechle 362992b19e VIDEO: Au1100fb: Fix section mismatch
WARNING: drivers/video/built-in.o(.data+0x360): Section mismatch in reference from the variable au1100fb_driver to the function .init.text:au1100fb_drv_probe()
The variable au1100fb_driver references
the function __init au1100fb_drv_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

Fixing which triggers of a slew of further mismatches:

WARNING: drivers/video/built-in.o(.devinit.text+0xc0): Section mismatch in reference from the function au1100fb_drv_probe() to the variable .init.data:au1100fb_fix
The function __devinit au1100fb_drv_probe() references
a variable __initdata au1100fb_fix.
If au1100fb_fix is only used by au1100fb_drv_probe then
annotate au1100fb_fix with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x21c): Section mismatch in reference from the function au1100fb_drv_probe() to the variable .init.data:au1100fb_var
The function __devinit au1100fb_drv_probe() references
a variable __initdata au1100fb_var.
If au1100fb_var is only used by au1100fb_drv_probe then
annotate au1100fb_var with a matching annotation.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-07-26 19:08:15 +01:00
Ralf Baechle 5b1638d940 VIDEO: PMAGB-B: Fix section mismatch
WARNING: drivers/built-in.o(.devinit.text+0xc0): Section mismatch in reference from the function pmagbafb_probe() to the variable .init.data:pmagbafb_fix
The function __devinit pmagbafb_probe() references
a variable __initdata pmagbafb_fix.
If pmagbafb_fix is only used by pmagbafb_probe then
annotate pmagbafb_fix with a matching annotation.

Fixing this one triggers a few more mismatches in order:

WARNING: drivers/video/built-in.o(.devinit.text+0x414): Section mismatch in reference from the function pmagbbfb_probe() to the variable .init.data:pmagbbfb_fix
The function __devinit pmagbbfb_probe() references
a variable __initdata pmagbbfb_fix.
If pmagbbfb_fix is only used by pmagbbfb_probe then
annotate pmagbbfb_fix with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x45c): Section mismatch in reference from the function pmagbbfb_probe() to the variable .init.data:pmagbbfb_defined
The function __devinit pmagbbfb_probe() references
a variable __initdata pmagbbfb_defined.
If pmagbbfb_defined is only used by pmagbbfb_probe then
annotate pmagbbfb_defined with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x5fc): Section mismatch in reference from the function pmagbbfb_probe() to the function .init.text:pmagbbfb_screen_setup()
The function __devinit pmagbbfb_probe() references
a function __init pmagbbfb_screen_setup().
If pmagbbfb_screen_setup is only used by pmagbbfb_probe then
annotate pmagbbfb_screen_setup with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x6f4): Section mismatch in reference from the function pmagbbfb_probe() to the function .init.text:pmagbbfb_osc_setup()
The function __devinit pmagbbfb_probe() references
a function __init pmagbbfb_osc_setup().
If pmagbbfb_osc_setup is only used by pmagbbfb_probe then
annotate pmagbbfb_osc_setup with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x5f8): Section mismatch in reference from the function pmagbbfb_osc_setup() to the variable .init.data:pmagbbfb_freqs.15993
The function __devinit pmagbbfb_osc_setup() references
a variable __initdata pmagbbfb_freqs.15993.
If pmagbbfb_freqs.15993 is only used by pmagbbfb_osc_setup then
annotate pmagbbfb_freqs.15993 with a matching annotation.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-07-26 19:08:15 +01:00
Ralf Baechle 9625b51350 VIDEO: PMAG-BA: Fix section mismatch
WARNING: drivers/video/built-in.o(.data+0x1e0): Section mismatch in reference fr
om the variable pmagbafb_driver to the function .init.text:pmagbafb_probe()
The variable pmagbafb_driver references
the function __init pmagbafb_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

Fixing this one triggers 2 more:

WARNING: drivers/video/built-in.o(.devinit.text+0xc0): Section mismatch in reference from the function pmagbafb_probe() to the variable .init.data:pmagbafb_fix
The function __devinit pmagbafb_probe() references
a variable __initdata pmagbafb_fix.
If pmagbafb_fix is only used by pmagbafb_probe then
annotate pmagbafb_fix with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x108): Section mismatch in reference from the function pmagbafb_probe() to the variable .init.data:pmagbafb_defined
The function __devinit pmagbafb_probe() references
a variable __initdata pmagbafb_defined.
If pmagbafb_defined is only used by pmagbafb_probe then
annotate pmagbafb_defined with a matching annotation.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-07-26 19:08:14 +01:00
Ralf Baechle 18f9f11a09 VIDEO. gbefb: Fix section mismatches.
WARNING: drivers/video/built-in.o(.devinit.text+0x54): Section mismatch in reference from the function gbefb_probe() to the function .init.text:gbefb_setup()
The function __devinit gbefb_probe() references
a function __init gbefb_setup().
If gbefb_setup is only used by gbefb_probe then
annotate gbefb_setup with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x208): Section mismatch in reference from the function gbefb_probe() to the variable .init.data:mode_option
The function __devinit gbefb_probe() references
a variable __initdata mode_option.
If mode_option is only used by gbefb_probe then
annotate mode_option with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x214): Section mismatch in reference from the function gbefb_probe() to the variable .init.data:default_mode
The function __devinit gbefb_probe() references
a variable __initdata default_mode.
If default_mode is only used by gbefb_probe then
annotate default_mode with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x23c): Section mismatch in reference from the function gbefb_probe() to the variable .init.data:default_var
The function __devinit gbefb_probe() references
a variable __initdata default_var.
If default_var is only used by gbefb_probe then
annotate default_var with a matching annotation.

Fixing these results in more mismatches:

WARNING: drivers/video/built-in.o(.devinit.text+0x3c): Section mismatch in reference from the function gbefb_setup() to the variable .init.data:default_var_LCD
The function __devinit gbefb_setup() references
a variable __initdata default_var_LCD.
If default_var_LCD is only used by gbefb_setup then
annotate default_var_LCD with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x14c): Section mismatch in reference from the function gbefb_setup() to the variable .init.data:default_mode_LCD
The function __devinit gbefb_setup() references
a variable __initdata default_mode_LCD.
If default_mode_LCD is only used by gbefb_setup then
annotate default_mode_LCD with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x150): Section mismatch in reference from the function gbefb_setup() to the variable .init.data:default_var_CRT
The function __devinit gbefb_setup() references
a variable __initdata default_var_CRT.
If default_var_CRT is only used by gbefb_setup then
annotate default_var_CRT with a matching annotation.

WARNING: drivers/video/built-in.o(.devinit.text+0x154): Section mismatch in reference from the function gbefb_setup() to the variable .init.data:default_mode_CRT
The function __devinit gbefb_setup() references
a variable __initdata default_mode_CRT.
If default_mode_CRT is only used by gbefb_setup then
annotate default_mode_CRT with a matching annotation.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-07-26 19:08:13 +01:00
Eric Bénard 7a2bb23c14 imxfb: add pwmr controlled backlight support
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-07-26 14:29:21 +02:00
Grant Likely 1ab1d63a85 of/platform: remove all of_bus_type and of_platform_bus_type references
Both of_bus_type and of_platform_bus_type are just #define aliases
for the platform bus.  This patch removes all references to them and
switches to the of_register_platform_driver()/of_unregister_platform_driver()
API for registering.

Subsequent patches will convert each user of of_register_platform_driver()
into plain platform_drivers without the of_platform_driver shim.  At which
point the of_register_platform_driver()/of_unregister_platform_driver()
functions can be removed.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David S. Miller <davem@davemloft.net>
2010-07-24 09:57:52 -06:00
Florian Tobias Schandinat af29a5b178 viafb: fix accel_flags check_var bug
viafb: fix accel_flags check_var bug

In check_var we should check and modify the var given and not the
one which is currently active. So this code was obviously wrong.
Probably this was doing no harm because all acceleration functions
also check whether acceleration is possible. (otherwise I would
expect this to lead to a null pointer dereference)

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
2010-07-23 14:46:11 +00:00
Florian Tobias Schandinat cd5899551c viafb: probe cleanups
viafb: probe cleanups

Removal of strange special cases that must not exist as well as a
useless check.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
2010-07-23 14:44:52 +00:00
Florian Tobias Schandinat 45f85f4a01 viafb: remove ioctls which break the framebuffer interface
viafb: remove ioctls which break the framebuffer interface

The ioctls VIAFB_SET_DEVICE, VIAFB_SET_DEVICE_INFO and
VIAFB_SET_SECOND_MODE are removed because they prevent a clean
framebuffer driver because they modify the hardware and/or the
internal structures.
There are no known applications using these ioctls so no breakage is
expected. Additionaly the main functionality was duplicating the
framebuffer interface so there really should not exist any user.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
2010-07-23 14:43:05 +00:00
Florian Tobias Schandinat 65123c68d1 viafb: update fix before calculating depth
viafb: update fix before calculating depth

As the depth calculation depends on information in fix it is saner to
do the update first.
No runtime change expected as the value visual in fix used never
changes to MONO.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
2010-07-23 14:41:06 +00:00
Florian Tobias Schandinat 1f84435090 viafb: PLL value cleanup
viafb: PLL value cleanup

This is a big change of how PLL values are handled on the road to
dynamic PLL value generation. The table was converted automatically in
the relevant parameters for frequency generation. Sadly there were some
bits set whose meaning is unknown. Those differences are documented
but ignored as the unichrome code implies that they are not important
(a big thanks to Luc for his amazing work).
The PLL values for 31490000 and 133308000 are deleted as they were more
than 5% off and not used anyway. The values for CX700@60466000 and
VX855@153920000 are corrected as they were wrong and easily correctable
as enough correct values was available because CX700 and VX855 support
the same values only with a little difference in hardware format.
All remaining values are not more than 2% off.
Additionally the surrounding code is changed as needed especially the
byte order of the values written to hardware to allow nicer conversion
functions.
This is mostly a change preparing for dynamic PLL generation and the two
corrected values aside no runtime change is expected.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
2010-07-23 14:37:05 +00:00
Florian Tobias Schandinat cc3fd679a3 viafb: simplify lcd size "detection"
viafb: simplify lcd size "detection"

Remove all occurences of get_lcd_size_method as only the values
GET_LCD_SIZE_BY_VGA_BIOS and GET_LCD_SIZE_BY_USER_SETTING were used
which had the identical code so there is no need to make things look
more complicated than they actually are.
Just a bit of of cleanup, really no regressions expected.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
2010-07-23 14:35:50 +00:00
Florian Tobias Schandinat ad0676cf81 viafb: fix PCI table
viafb: fix PCI table

This patch fixes an oddity in the device table where the P4M890 ID was
assigned with the enumeration value of CN700 which itself was missing.
This is a regression introduced by
	"viafb: make viafb a first-class citizen using pci_driver"

While at it reorder the table to reflect the order of the  enumeration
values.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Harald Welte <laforge@gnumonks.org>
2010-07-23 14:26:18 +00:00
Florian Tobias Schandinat f1ad752a09 viafb: add lcd scaling support for some IGPs
viafb: add lcd scaling support for some IGPs

These IGPs should also support lcd scaling but likely this switch was
missed when adding support for them. Fix it, allowing lcd scaling on
CN750, VX800 and VX855. At least this improves the situation for
VX855. (there seems to be another scaling unrelated bug somewhere)

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
2010-07-23 14:21:14 +00:00
Florian Tobias Schandinat 119b953a80 viafb: improve lcd code readability
viafb: improve lcd code readability

This changes the code to better reflect that we can (currently) only
perform upscaling.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
2010-07-23 14:17:58 +00:00
Florian Tobias Schandinat 4a73d70ebe viafb: remove duplicated scaling code
viafb: remove duplicated scaling code

The code for P4M900 does the same as for all newer IGPs so there is no
reason to duplicate it. Just reducing the code to maintain.

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
2010-07-23 14:16:01 +00:00
Sheng Yang bee6ab53e6 x86: early PV on HVM features initialization.
Initialize basic pv on hvm features adding a new Xen HVM specific
hypervisor_x86 structure.

Don't try to initialize xen-kbdfront and xen-fbfront when running on HVM
because the backends are not available.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Yaozu (Eddie) Dong <eddie.dong@intel.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-07-22 16:45:35 -07:00
Linus Torvalds a4ce96ac35 Fix up trivial spelling errors ('taht' -> 'that')
Pointed out by Lucas who found the new one in a comment in
setup_percpu.c. And then I fixed the others that I grepped
for.

Reported-by: Lucas <canolucas@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-07-21 09:25:42 -07:00
Pavel Machek a2531293db update email address
pavel@suse.cz no longer works, replace it with working address.

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-07-19 10:56:54 +02:00
Tony Lindgren fb78b51cb1 ARM: Disable VGA console for ARM in most cases
Otherwise we have to disable it manually to avoid compile errors.

Now it's only enabled only for the selected machines as suggested
by Anton Vorontsov <cbouatmailru@gmail.com>:

$ git grep VGA_CONSOLE= arch/arm/configs/
arch/arm/configs/footbridge_defconfig:CONFIG_VGA_CONSOLE=y
arch/arm/configs/integrator_defconfig:CONFIG_VGA_CONSOLE=y
arch/arm/configs/netwinder_defconfig:CONFIG_VGA_CONSOLE=y

Note that the Kconfig entry no longer needs separate entries
for ARCH_ACORN, ARCH_EBSA110 ARCH_VERSATILE.

Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-07-05 16:31:46 +03:00
Tony Lindgren 18dbe6c5dd omap: mux: Mux Apollon LCD power in board-apollon.c
Use the new mux function for that.

Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-07-05 16:31:39 +03:00
Wan ZongShun 032093bd44 drivers/video/nuc900fb.c: fix lcd build error
Fix a nuc900 lcd build error.

Since the 'nuc900_driver_clksrc_div()' API cannot be merged into mainline
successfully, I removed this clock source selection hook in this driver.
This means nuc900 lcd driver has to select default clock source from the
external crystal now.

Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Qiang Wang <rurality.wq@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-06-29 15:29:32 -07:00
Andres Salomon 12c46b3365 lxfb: fix incorrect __init annotation
WARNING: vmlinux.o(.data+0x196e8): Section mismatch in reference from the
variable lxfb_driver to the function .init.text:lxfb_probe() The variable
lxfb_driver references the function __init lxfb_probe()

This changes lxfb_probe and friends to use __devinit, and also adds
__devexit to lxfb_remove.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Cc: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-06-29 15:29:31 -07:00
Andres Salomon 500ebb82b5 gxfb: fix incorrect __init annotation
WARNING: vmlinux.o(.data+0x195d8): Section mismatch in reference from the
variable gxfb_driver to the function .init.text:gxfb_probe() The variable
gxfb_driver references the function __init gxfb_probe()

This changes gxfb_probe and friends to use __devinit, and also adds
__devexit to gxfb_remove.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Cc: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-06-29 15:29:31 -07:00
Linus Torvalds 7f607455c3 Merge branch 'for-linus' of git://gitorious.org/linux-omap-dss2/linux
* 'for-linus' of git://gitorious.org/linux-omap-dss2/linux:
  OMAP: OMAPFB: fix rfbi.c compile error
  OMAPFB: LCDC: change update_mode to DISABLED when going suspend
2010-06-27 07:36:16 -07:00
Jiri Kosina f1bbbb6912 Merge branch 'master' into for-next 2010-06-16 18:08:13 +02:00
Uwe Kleine-König 421f91d21a fix typos concerning "initiali[zs]e"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-06-16 18:05:05 +02:00
Tomi Valkeinen bc092a303a OMAP: OMAPFB: fix rfbi.c compile error
The code in rfbi.c tried to get the omapdss platform_device via a static
member defined in dispc.c, leading to a compile error. The same
platform_device is available through rfbi-struct.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-06-15 10:17:25 +03:00
Janusz Krzysztofik 256a804283 OMAPFB: LCDC: change update_mode to DISABLED when going suspend
I was observing the following error messages on my OMAP1 based Amstrad Delta
board when first changing from text to graphics mode or vice versa after the
LCD display had been blanked:
	omapfb omapfb: timeout waiting for FRAME DONE
with a followup error message while unblanking it back:
	omapfb omapfb: resetting (status 0xffffffb2,reset count 1)
As a visible result, image pixels happened to be shifted by a few bits,
giving wrong colors.

Examining the code, I found that this problem occures when an OMAP1 internal
LCD controller is disabled from omap_lcdc_suspend() and then a subsequent
omap_lcdc_setup_plane() calls disable_controller() again. This potentially
error provoking behaviour is triggered by the lcdc.update_mode flag being kept
at OMAP_AUTO_UPDATE, regardless of the controller and panel being suspended.

This patch tries to correct the problem by replacing both omap_lcdc_suspend()
and omap_lcdc_resume() function bodies with single calls to
omap_lcdc_set_update_mode() with a respective OMAP_UPDATE_DISABLE or
OMAP_AUTO_UPDATE argument. As a result, exactly the same lower level
operations are performed, with addition of changing the lcdc.update_mode flag
to a value better suited for the controller state. This prevents any further
calls to disable_controller() from omap_lcdc_setup_plane() while the display
is suspended.

Created against linux-2.6.34-rc7.
Tested on Amstrad Delta.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-06-15 10:17:19 +03:00
Linus Torvalds 999fd1ab34 Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (23 commits)
  sh: Make intc messages consistent via pr_fmt.
  sh: make sure static declaration on ms7724se
  sh: make sure static declaration on mach-migor
  sh: make sure static declaration on mach-ecovec24
  sh: make sure static declaration on mach-ap325rxa
  clocksource: sh_cmt: compute mult and shift before registration
  clocksource: sh_tmu: compute mult and shift before registration
  sh: PIO disabling for x3proto and urquell.
  sh: mach-sdk7786: conditionally disable PIO support.
  sh: support for platforms without PIO.
  usb: r8a66597-hcd pio to mmio accessor conversion.
  usb: gadget: r8a66597-udc pio to mmio accessor conversion.
  usb: gadget: m66592-udc pio to mmio accessor conversion.
  sh: add romImage MMCIF boot for sh7724 and Ecovec V2
  sh: add boot code to MMCIF driver header
  sh: prepare MMCIF driver header file
  sh: allow romImage data between head.S and the zero page
  sh: Add support MMCIF for ecovec
  sh: remove duplicated #include
  input: serio: disable i8042 for non-cayman sh platforms.
  ...
2010-06-04 15:42:09 -07:00
Thadeu Lima de Souza Cascardo b1413357d9 fbdev: fix frame buffer devices menu
Commit f601441916 ("imxfb: add support for
i.MX25:) has inserted the symbol HAVE_FB_IMX, which does not depend on FB
after the menuconfig FB.  This breaks the menu, presenting most of the
drivers outside of it, when using menuconfig.

Moving the symbol to the start of the file, just like HAVE_FB_ATMEL, fixes
the problem without breaking it for iMX25 configurations (tested with
ARCH=arm, no build).

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-06-04 15:21:45 -07:00
Albert Herranz d6d03f9158 fb_defio: redo fix for non-dirty ptes
As pointed by Nick Piggin, ->page_mkwrite provides a way to keep a page
locked until the associated PTE is marked dirty.

Re-implement the fix by using this mechanism.

Signed-off-by: Albert Herranz <albert_herranz@yahoo.es>
Acked-by: Jaya Kumar <jayakumar.lkml@gmail.com>
Acked-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-06-04 15:21:45 -07:00
Albert Herranz 3f505ca457 Revert "fb_defio: fix for non-dirty ptes"
This reverts commit 49bbd815fd ("fb_defio:
fix for non-dirty ptes").

Although the fix provided is correct, it's been suggested to avoid the
underlying race in the same way as it is currently done in filesystems
like NFS, for maintainability.

A following patch "fb_defio: redo fix for non-dirty ptes" will provide
such an alternate fix.

Signed-off-by: Albert Herranz <albert_herranz@yahoo.es>
Cc: Jaya Kumar <jayakumar.lkml@gmail.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-06-04 15:21:45 -07:00
Linus Torvalds ceadda057c 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: Remove all i2c_set_clientdata(client, NULL) in drivers
  i2c/busses: Move two drivers to embedded section
  i2c: Rename i2c_check_addr to i2c_check_addr_busy
  i2c: Document reserved I2C addresses
  i2c: Check for address validity on client registration
  i2c: Share the I2C device presence detection code
  Documentation/i2c: Checkpatch cleanup
2010-06-03 15:44:43 -07:00
Linus Torvalds a652883a24 Merge branch 'merge' of git://git.secretlab.ca/git/linux-2.6
* 'merge' of git://git.secretlab.ca/git/linux-2.6:
  of/powerpc: fix fsl_msi device node pointer
  of/watchdog: gef_wdt.c: fix build breakage
  of/edac: fix build breakage in drivers
  of/net: fs_enet/mii-bitbang.c: fix build breakage
  of/usb: fsl_qe_udc.c: fix build breakage
  of/crypto: crypto4xx_core.c: fix build breakage
  of/dma: fix build breakage in ppc4xx adma driver
  of/mtd: nand: fix build breakage in drivers
  of/video: fix build breakage in FB drivers
  of/pcmcia: m8xx_pcmcia.c: Fix build failures
  of/rtc: rtc-mpc5121.c: Fix build failures
  of/dma: mpc512x_dma.c: Fix build failures
  of/mtd/nand: mpc5121_nfc.c: Fix build failures
  of/spi: mpc512x_psc_spi.c: Fix build failures
  watchdog: Fix build failure with OF changes
  of/spi: Fix build failure on spi_ppc4xx.c
  of/usb: fix build error due to of_node pointer move
  of/powerpc: fix 85xx RapidIO device node pointer
2010-06-03 07:17:31 -07:00
Wolfram Sang fbae3fb154 i2c: Remove all i2c_set_clientdata(client, NULL) in drivers
I2C drivers can use the clientdata-pointer to point to private data. As I2C
devices are not really unregistered, but merely detached from their driver, it
used to be the drivers obligation to clear this pointer during remove() or a
failed probe(). As a couple of drivers forgot to do this, it was agreed that it
was cleaner if the i2c-core does this clearance when appropriate, as there is
no guarantee for the lifetime of the clientdata-pointer after remove() anyhow.
This feature was added to the core with commit
e4a7b9b04d to fix the faulty drivers.

As there is no need anymore to clear the clientdata-pointer, remove all current
occurrences in the drivers to simplify the code and prevent confusion.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Richard Purdie <rpurdie@linux.intel.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-06-03 11:33:58 +02:00
Anatolij Gustschin d4b8b2c2c0 of/video: fix build breakage in FB drivers
Fixes build errors in a number of framebuffer drivers caused
by the OF device_node pointer being moved into struct device

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-06-02 21:02:38 -06:00
Mikulas Patocka a57ee62749 Fix colors for Mach64
Use the same color-calculating algorithm as in atyfb_imageblit in this
driver or in generic cfb_fillrect.

This patch fixes bad colors when using an accelerator in 15-bit and
16-bit modes.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-06-02 14:41:12 -07:00
Paul Mundt 8fa76f7e61 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2010-05-31 12:59:19 +09:00
Christoph Hellwig 7ea8085910 drop unused dentry argument to ->fsync
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-05-27 22:05:02 -04:00
Linus Torvalds cad719d86e Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight:
  gta02: Use pcf50633 backlight driver instead of platform backlight driver.
  backlight: pcf50633: Register a pcf50633-backlight device in pcf50633 core driver.
  backlight: Add pcf50633 backlight driver
  backlight: 88pm860x_bl: fix error handling in pm860x_backlight_probe
  backlight: max8925_bl: Fix error handling path
  backlight: l4f00242t03: fix error handling in l4f00242t03_probe
  backlight: add S6E63M0 AMOLED LCD Panel driver
  backlight: adp8860: add support for ADP8861 & ADP8863
  backlight: mbp_nvidia_bl - Fix DMI_SYS_VENDOR for MacBook1,1
  backlight: Add Cirrus EP93xx backlight driver
  backlight: l4f00242t03: Fix regulators handling code in remove function
  backlight: fix adp8860_bl build errors
  backlight: new driver for the ADP8860 backlight parts
  backlight: 88pm860x_bl - potential memory leak
  backlight: mbp_nvidia_bl - add support for older MacBookPro and MacBook 6,1.
  backlight: Kconfig cleanup
  backlight: backlight_device_register() return ERR_PTR()
2010-05-27 11:34:55 -07:00
Mike Frysinger 8fc809d179 fbdev: bf54x-lq043fb: fix unused warnings with backlight code
The current backlight code is stubbed out, so the new props changes added
some warnings:
drivers/video/bf54x-lq043fb.c: In function 'bfin_bf54x_probe':
drivers/video/bf54x-lq043fb.c:666: warning: label 'out9' defined but not used
drivers/video/bf54x-lq043fb.c:504: warning: unused variable 'props'

Fix em !

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-27 09:12:42 -07:00
Mike Frysinger d11991cbac fbdev: bfin-t350mcqb-fb: avoid unused warnings in backlight code
The current backlight code is stubbed out, so the new props changes added
some warnings about unused label/prop.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-27 09:12:42 -07:00
Julia Lawall a51faabc66 drivers/video/via: use memdup_user
Use memdup_user when user data is immediately copied into the
allocated region.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to,size,flag;
position p;
identifier l1,l2;
@@

-  to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+  to = memdup_user(from,size);
   if (
-      to==NULL
+      IS_ERR(to)
                 || ...) {
   <+... when != goto l1;
-  -ENOMEM
+  PTR_ERR(to)
   ...+>
   }
-  if (copy_from_user(to, from, size) != 0) {
-    <+... when != goto l2;
-    -EFAULT
-    ...+>
-  }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: 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-05-27 09:12:42 -07:00
Ondrej Zary 9966c4fea5 add support for S3 Trio3D/1X/2X
Add support for S3 Trio3D/1X (86C360) and S3 Trio3D/2X (86C362 and 86C368)
cards to s3fb driver.  Tested with 86C362 AGP and 86C368 PCI&AGP.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Acked-by: Ondrej Zajicek <santiago@crfreenet.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-27 09:12:42 -07:00
Lars-Peter Clausen 2ddfd12f35 backlight: Add pcf50633 backlight driver
This patch adds a backlight driver for controlling the pcf50633 LED module.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-05-26 17:34:38 +01:00
Axel Lin 1f976996c7 backlight: 88pm860x_bl: fix error handling in pm860x_backlight_probe
This patch  properly unregisters a previously registered backlight device object
in error handling

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-05-26 17:34:37 +01:00
Axel Lin 146e10a8c4 backlight: max8925_bl: Fix error handling path
Properly unregister a previously registered backlight device object in error
handling of max8925_backlight_probe.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-05-26 17:34:36 +01:00
Axel Lin beb0a43f39 backlight: l4f00242t03: fix error handling in l4f00242t03_probe
Error handling fixes:
1. In the case of kzalloc failure, simple return -ENOMEM instead of goto
   err. ( priv is NULL in this case )
2. In the case of gpio_request fail for reset_gpio and data_enable_gpio,
   properly release resources by goto err and err2 respectively.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-05-26 17:34:35 +01:00
InKi Dae ee378a5c65 backlight: add S6E63M0 AMOLED LCD Panel driver
This is S6E63M0 AMOLED LCD Panel(480x800) driver using 3-wired SPI
interface also almost features for lcd panel driver has been implemented
in here.  and I added new structure common for all the lcd panel drivers
to include/linux/lcd.h file.

LCD Panel driver needs interfaces for controlling device power such as
power on/off and reset.  these interfaces are device specific so it should
be implemented to machine code at this time, we should create new
structure for registering these functions as callbacks and also a header
file for that structure and finally registered callback functions would be
called by lcd panel driver.  such header file(including new structure for
lcd panel) would be added for all the lcd panel drivers.

If anyone provides common structure for registering such callback
functions then we could reduce unnecessary header files for lcd panel.  I
thought that suitable anyone could be include/linux/lcd.h so a new
lcd_platform_data structure was added there.

[akpm@linux-foundation.org: coding-style fixes]
[randy.dunlap@oracle.com: fix s6e63m0 kconfig]
[randy.dunlap@oracle.com: fix device attribute functions return types]
Signed-off-by: InKi Dae <inki.dae@samsung.com>
Reviewed-by: KyungMin Park <kyungmin.park.samsung.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-05-26 17:34:16 +01:00