dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

194 Commits

Author SHA1 Message Date
Tomi Valkeinen bbecb50b5f OMAP: DSS2: DSI: Add error IRQ mask for DSI complexIO
The code presumed that all ComplexIO interrupts are errors. This is not
the case. This patch adds proper error mask for CIO interrupt handling.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-05 16:52:05 +03:00
Tomi Valkeinen fa15c79b9a OMAP: DSS2: DSI: Remove BTA after set_max_rx_packet_size
SMRPS function always sent BTA after sending the SMRPS packet. This is
not needed, and also caused some (buggy) panels to bug. This patch
removes the BTA.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-05 16:52:04 +03:00
Tomi Valkeinen 26a8c2507a OMAP: DSS2: change manual update scaling setup
Currently the update area on manual update displays is automatically
enlargened to fully cover scaled overlays. This patch makes that
optional, allowing the panel driver to choose if it's used or not.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-05 16:52:03 +03:00
Tomi Valkeinen ab83b14c82 OMAP: DSS2: DSI: use BTA to end the frame transfer
Previously a work was started on FRAMEDONE interrupt, and this work
either sent a BTA synchronously or looped until TE_SIZE was zero, to
wait for the end of the transfer.

This patch changes a BTA to be sent asynchronously from FRAMEDONE
interrupt, and when a BTA interrupt is received, the transfer is
finished. This way we do the whole process asynchronously, and also
inside interrupt context.

This will give us much better latency to handle the end of the frame
than with the previous work based solution.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-05 16:52:02 +03:00
Tomi Valkeinen 9ecd96842b OMAP: DSS2: DSI: change dsi_vc_config_l4/vp()
Change dsi_vc_config_l4/vp() to loop for the VC_BUSY flag to change, and
return an error if it fails.

Busy looping is bad, but there's no interrupt that can be used for all the
cases where VC can be busy. So the caller should first try to make sure
that the VC is not busy, if possible, and then call dsi_vc_config_l4/vp().

Most notable case when the caller cannot be sure if the VC is busy is
after frame has been sent. Usually DSI buffers have been emptied until we
need to reconfig the VC, but in some rare cases the VC can still be busy,
and this patch will handle that case.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-05 16:52:01 +03:00
Ville Syrjälä d73701044b OMAP: DSS2: DSI: Disable interface when disabling the display
Once the DSI PLL is separated from the DSI display a full DSI reset will
not be performed every time the display is enabled so the interface and
VCs must be disabled when disabling the display. If the VCs are not
disabled some register accesses will abort.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-05 16:51:56 +03:00
Tomi Valkeinen e406f9079b OMAP: DSS2: DSI: Wait for DSI PLL clocks to be active before selecting them
The TRM tells us to wait for the DSI PLL derived clocks to become
active before selecting them for use. I didn't actually have any issues
which this would fix but according to the TRM it seems to be the right
thing to do.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-05 16:51:49 +03:00
Ville Syrjälä ebf0a3fef2 OMAP: DSS2: DSI: Print an error message if DSI clock calc fails
Print an error message if dsi_calc_clock_rates() fails just like it's
done when dispc_calc_clock_rates() fails.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-05 16:51:43 +03:00
Ville Syrjälä 481dfa0eb9 OMAP: DSS2: DSI: Disable PCKFREE on error
Do not leave the free running pixel clock enabled if the DSI PLL reset
times out.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-08-05 16:51:23 +03:00
Linus Torvalds f63b759c44 Merge branch 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (243 commits)
  V4L/DVB: sms: Convert IR support to use the Remote Controller core
  V4L/DVB: sms: properly initialize IR phys and IR name
  V4L/DVB: standardize names at rc-dib0700 tables
  V4L/DVB: smsusb: enable IR port for Hauppauge WinTV MiniStick
  V4L/DVB: dib0700: Fix RC protocol logic to properly handle NEC/NECx and RC-5
  V4L/DVB: dib0700: properly implement IR change_protocol
  V4L/DVB: dib0700: break keytable into NEC and RC-5 variants
  V4L/DVB: dib0700: avoid bad repeat
  V4L/DVB: Port dib0700 to rc-core
  V4L/DVB: Add a keymap file with dib0700 table
  V4L/DVB: dvb-usb: add support for rc-core mode
  V4L/DVB: dvb-usb: prepare drivers for using rc-core
  V4L/DVB: dvb-usb: get rid of struct dvb_usb_rc_key
  V4L/DVB: rj54n1cb0c: fix a comment in the driver
  V4L/DVB: V4L2: sh_vou: VOU does support the full PAL resolution too
  V4L/DVB: V4L2: sh_mobile_camera_ceu: add support for CSI2
  V4L/DVB: V4L2: soc-camera: add a MIPI CSI-2 driver for SH-Mobile platforms
  V4L/DVB: V4L2: soc-camera: export soc-camera bus type for notifications
  V4L/DVB: V4L2: mediabus: add 12-bit Bayer and YUV420 pixel formats
  V4L/DVB: mediabus: fix ambiguous pixel code names
  ...
2010-08-04 10:38:08 -07:00
Benjamin Herrenschmidt dbe3039e64 memblock/arm: Use memblock_region_is_memory() for omap fb
Instead of the deprecated memblock_find()

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2010-08-04 14:38:56 +10:00
Benjamin Herrenschmidt e3239ff92a memblock: Rename memblock_region to memblock_type and memblock_property to memblock_region
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2010-08-04 14:21:49 +10:00
Jani Nikula 1e8943dbae OMAP: DSS2: Taal: CABC workaround is Taal specific
Prepare for supporting panels other than Taal in this driver.

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 c8cd4547dc OMAP: DSS2: Taal: Add regulator configuration support
Add support for configuring regulators in the panel specific
configuration 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:49 +03:00
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
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
Jani Nikula fce064cbda OMAP: DSS2: Fix omap_dss_probe() error path
Perform graceful cleanup on errors instead of just bailing out.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Tested-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-05-18 15:06:09 +03:00
Jani Nikula 368a148ea3 OMAP: DSS2: omap_dss_probe() conditional compilation cleanup
Move a number of #ifdefs from code into dss.h and elsewhere, and
conditionally define no-op static inline functions, cleaning up the
code. This style is according to Documentation/SubmittingPatches.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-05-18 15:06:08 +03:00
Carlos Lopez a3bb67a75c OMAP2: DSS: Add missing line for update bg color
The driver set the background color canvas but never writes it in
DISPC_DEFAULT_COLOR_m register, which changes the background color
on the LCD or TV.

This patch adds a line to call to dispc_set_default_color() which is
the function in charge to write the DISPC_DEFAULT_COLOR_m register.

Signed-off-by: Carlos Lopez <carlos.cruz@sasken.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-05-18 15:06:06 +03:00
Kishore Y ac01bb7ea0 OMAP3630: DSS2: Updating MAX divider value
In DPLL4 M3, M4, M5 and M6 field width has been increased by 1 bit in 3630.
So the max divider value that can be achived will be 32 and not 16.
In 3630 the functional clock is x1 of DPLL4 and not x2. Hence multiplier 2
is removed.

Signed-off-by: Sudeep Basavaraj <sudeep.basavaraj@ti.com>
Signed-off-by: Mukund Mittal <mmittal@ti.com>
Signed-off-by: Kishore Y <kishore.y@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-05-18 15:06:06 +03:00
Roger Quadros 0188352b27 OMAP: DSS2: Add ACX565AKM Panel Driver
This is the panel used on Nokia N900

Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-05-18 15:06:04 +03:00
Grazvydas Ignotas a40458eee7 OMAP: DSS2: TPO-TD03MTEA1: fix Kconfig dependency
This panel depends on SPI, not I2C.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-05-18 15:06:02 +03:00
Vaibhav Hiremath 2b88c5bc31 OMAP: LCD LS037V7DW01: Add Backlight driver support
Tested on OMAP3EVM for OMAP3530 and AM/DM 3730.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
[tomi.valkeinen@nokia.com: added slab.h include]
[tomi.valkeinen@nokia.com: added dependency to BACKLIGHT_CLASS_DEVICE]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-05-18 15:05:24 +03:00
Ville Syrjälä 6df37271f8 OMAP: DSS2: Taal: Fix DSI bus locking problem
If omapdss_dsi_display_enable() failed the DSI bus was left locked. Also
if the operation failed later omapdss_dsi_display_disable() would get
called without holding the bus lock.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-05-18 14:14:30 +03:00
Tomi Valkeinen a3201a0eae OMAP: DSS2: Taal: add mutex to protect panel data
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-05-18 14:14:30 +03:00
Tomi Valkeinen f49a951f8a OMAP: DSS2: Make partial update width even
There are some strange problems with DSI and updates with odd widths. One
particular problem is that HS TX timeout triggers easily with updates with
odd widths.

This patch makes the updates widths even, circumventing the problem. There
should be no ill side effects with increasing the update area slightly to
make the width even.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-05-18 14:14:30 +03:00
Jani Nikula 279fcd48c4 OMAP: DSS2: Fix device disable when driver is not loaded
Only call driver disable when device isn't already disabled, which also
handles the driver not loaded case.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-05-18 14:14:30 +03:00
Jani Nikula 35bc42c504 OMAP: DSS2: VENC: don't call platform_enable/disable() twice
platform_enable/disable() is already called in venc_power_on/off(), so
don't do it again in venc_panel_enable/disable().

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-05-18 14:14:30 +03:00
Jani Nikula 27b67c92a3 OMAP: DSS2: check lock_fb_info() return value
Give up if lock_fb_info() fails, following the same convention as other
lock_fb_info() users.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-05-18 14:14:29 +03:00
Jani Nikula 238a41329c OMAP: DSS2: fix lock_fb_info() and omapfb_lock() locking order
Framebuffer ioctl processing forces lock_fb_info() -> omapfb_lock()
locking order. Follow that order to avoid possible circular locking
dependency, detected by lockdep.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-05-18 14:14:29 +03:00
Roger Quadros 508886cf98 OMAP: DSS2: Use vdds_sdi regulator supply in SDI
This patch enables the use of vdds_sdi regulator in SDI subsystem.
We can disable the vdds_sdi voltage when not in use to save
power.

Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-05-18 14:14:29 +03:00
Roger Quadros b1d145b6d3 OMAP: DSS2: Remove redundant enable/disable calls from SDI
Panel enable/disable is now done via the panel driver, so we should not
call the panel driver again

Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-05-18 14:14:29 +03:00
Roger Quadros b4d78bf7a4 OMAP: DSS2: Add Kconfig option for DPI display type
This allows us to disable DPI on systems that do not have it

Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-05-18 14:14:29 +03:00
Tejun Heo 5a0e3ad6af include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-30 22:02:32 +09:00
Linus Torvalds 01e77706cd Merge branch 'for-linus' of git://gitorious.org/linux-omap-dss2/linux
* 'for-linus' of git://gitorious.org/linux-omap-dss2/linux:
  OMAP: DSS2: panel-generic: re-implement mode changing
  OMAP: DSS2: initialize dss clk sources properly
  OMAP: DSS2: VRAM: Fix early_param for vram
2010-03-24 16:52:15 -07:00
Matthew Garrett a19a6ee6ca backlight: Allow properties to be passed at registration
Values such as max_brightness should be set before backlights are
registered, but the current API doesn't allow that. Add a parameter to
backlight_device_register and update drivers to ensure that they
set this correctly.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-16 19:47:54 +00:00
Tomi Valkeinen 8871d54b5e OMAP: DSS2: panel-generic: re-implement mode changing
Mode changing code was left out with the DSS driver remodeling. Add the
code back.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-03-15 11:07:40 +02:00
Tomi Valkeinen ce619e1fb8 OMAP: DSS2: initialize dss clk sources properly
Clk sources were not initialized, leading to kernel crash, or possibly to
strange behaviour if DSI was compiled in.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-03-15 10:34:52 +02:00
Thomas Weber 5c1f96f4cf OMAP: DSS2: VRAM: Fix early_param for vram
In commit 2b0d8c251b the __early_param is
replaced with the generic early_param. This patch fixes the parameter passing
for the vram.

Signed-off-by: Thomas Weber <weber@corscience.de>
[tomi.valkeinen@nokia.com: changed the commit prefix]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-03-10 13:15:45 +02:00
Emese Revfy 52cf25d0ab Driver core: Constify struct sysfs_ops in struct kobj_type
Constify struct sysfs_ops.

This is part of the ops structure constification
effort started by Arjan van de Ven et al.

Benefits of this constification:

 * prevents modification of data that is shared
   (referenced) by many other structure instances
   at runtime

 * detects/prevents accidental (but not intentional)
   modification attempts on archs that enforce
   read-only kernel data at runtime

 * potentially better optimized code as the compiler
   can assume that the const data cannot be changed

 * the compiler/linker move const data into .rodata
   and therefore exclude them from false sharing

Signed-off-by: Emese Revfy <re.emese@gmail.com>
Acked-by: David Teigland <teigland@redhat.com>
Acked-by: Matt Domsch <Matt_Domsch@dell.com>
Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Acked-by: Hans J. Koch <hjk@linutronix.de>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-07 17:04:49 -08:00
Tomi Valkeinen 21df20fcfb OMAP: DSS2: Taal: Fix TE when resuming
TE was not initialized properly on power on, which broke TE when resuming
from suspend.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-03-02 17:24:18 +02:00
Tomi Valkeinen 1189b7ff64 OMAP: DSS2: Taal: Fix ESD check
Using taal_enable_te() when DSI bus was locked caused a deadlock.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-03-01 14:22:57 +02:00
Ville Syrjälä a4c1a148a0 OMAP: DSS2: OMAPFB: Constify some function parameters
Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-03-01 13:23:26 +02:00
Tomi Valkeinen 5d68e0326b OMAP: DSS2: DSI: add error prints
Add error printing for dsi_vc_dcs_write() and dsi_vc_dcs_read().

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-26 17:44:10 +02:00
Tomi Valkeinen 6068475400 OMAP: DSS2: TPO-TD03MTEA1: fix function names
Copy/paste had resulted in wrong function names in TPO TD043MTEA1 panel
driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-26 11:34:24 +02:00
Tomi Valkeinen 53055aae20 OMAP: DSS2: DSI: add dsi_vc_dcs_read_2() helper
Add dsi_vc_dcs_read_2() helper function to read two bytes from the DSI
peripheral.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-25 18:28:41 +02:00
Tomi Valkeinen ddbfeb396e OMAP: DSS2: OMAPFB: Remove FB_OMAP2_FORCE_AUTO_UPDATE
Remove the option for forcing auto-update. Auto-update for manual update
displays is no more a DSS feature, so if a particular display devices does
have auto-update mode, it should be in display's custom settings.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24 14:31:28 +02:00
Tomi Valkeinen 942a91a6e0 OMAP: DSS2: DSI: remove external TE support
With the reworked model, DSI driver doesn't need to know anything about
external TE lines. Thus we can remove ext_te support, and only leave the
DSI TE trigger support.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24 14:31:28 +02:00
Tomi Valkeinen 69b2048f44 OMAP: DSS2: move timing functions
Move check/set/get_timings() from omap_dss_device to omap_dss_driver.

This is part of a larger patch-set, which moves the control from omapdss
driver to the display driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24 14:31:28 +02:00
Tomi Valkeinen 3651131268 OMAP: DSS2: move set/get_wss()
Move set/get_wss() from omap_dss_device to omap_dss_driver.

This is part of a larger patch-set, which moves the control from omapdss
driver to the display driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24 14:31:28 +02:00
Tomi Valkeinen 37ac60e414 OMAP: DSS2: move enable/disable/suspend/resume
Move enable/disable/suspend/resume from omap_dss_device to
omap_dss_driver.

This is part of a larger patch-set, which moves the control from omapdss
driver to the display driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24 14:31:28 +02:00
Tomi Valkeinen 18946f62c6 OMAP: DSS2: move update() and sync()
Move update() and sync() from omap_dss_device to omap_dss_driver.

Also, update was hardcoded to use virtual channel 0. This patch adds a
parameter that specifies the VC.

This is part of a larger patch-set, which moves the control from omapdss
driver to the display driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24 14:31:28 +02:00
Tomi Valkeinen 446f7bff70 OMAP: DSS2: move set/get_update_mode()
Move set/get_update_mode() from omap_dss_device to omap_dss_driver.

This is part of a larger patch-set, which moves the control from omapdss
driver to the display driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24 14:31:28 +02:00
Tomi Valkeinen 225b650d41 OMAP: DSS2: move enable/get_te()
Move enable/get_te() from omap_dss_device to omap_dss_driver.

This is part of a larger patch-set, which moves the control from omapdss
driver to the display driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24 14:31:27 +02:00
Tomi Valkeinen a269950405 OMAP: DSS2: move get_recommended_bpp()
Move get_recommended_bpp() from omap_dss_device to omap_dss_driver.

This is part of a larger patch-set, which moves the control from omapdss
driver to the display driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24 14:31:27 +02:00
Tomi Valkeinen 96adceceed OMAP: DSS2: move get_resolution()
Move get_resolution() from omap_dss_device to omap_dss_driver.

This is part of a larger patch-set, which moves the control from omapdss
driver to the display driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24 14:31:27 +02:00
Tomi Valkeinen a2faee84f6 OMAP: DSS2: move enable/disable_channel to overlay manager
Move enable/disable_channel() from omap_dss_device to overlay manager.

This is part of a larger patch-set, which moves the control from omapdss
driver to the display driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24 14:31:27 +02:00
Tomi Valkeinen 3f71cbe736 OMAP: DSS2: move wait_vsync()
Move wait_vsync() from omap_dss_device to overlay manager.

This is part of a larger patch-set, which moves the control from omapdss
driver to the display driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24 14:31:27 +02:00
Tomi Valkeinen 87424e1bff OMAP: DSS2: move get/set_rotate()
Move get/set_rotate() from omap_dss_device to omap_dss_driver.

This is part of a larger patch-set, which moves the control from omapdss
driver to the display driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24 14:31:27 +02:00
Tomi Valkeinen 8d8aa61dcf OMAP: DSS2: move set/get_mirror()
Move set/get_mirror() from omap_dss_device to omap_dss_driver.

This is part of a larger patch-set, which moves the control from omapdss
driver to the display driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24 14:31:27 +02:00
Tomi Valkeinen c75d9464c1 OMAP: DSS2: move memory_read()
Move memory_read() from omap_dss_device to omap_dss_driver.

This is part of a larger patch-set, which moves the control from omapdss
driver to the display driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24 14:31:27 +02:00
Tomi Valkeinen 1a75ef422d OMAP: DSS2: move run_test()
Move run_test() from omap_dss_device to omap_dss_driver.

This is part of a larger patch-set, which moves the control from omapdss
driver to the display driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24 14:31:26 +02:00
Tomi Valkeinen 1bbb275e26 OMAP: DSS2: DSI: remove auto-update perf measurement
Remove performance measurement for auto-update. Auto-update and thus
performance measurement cannot be supported after the driver change where
the control is moved to display drivers.

This is part of a larger patch-set, which moves the control from omapdss
driver to the display driver.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24 14:31:26 +02:00
Tomi Valkeinen b9eb5d7d0b OMAP: DSS2: DSI: change DSI bus_lock to semaphore
Physical DSI bus is protected by a mutex. This patch changed the mutex to
a semaphore, so that we can lock and unlock the bus_lock from different
threads.

This is needed as the update process is started by user space program, and
thus the lock is acquired in that context, but the lock can be released in
different context, a work thread via irq.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-24 14:31:26 +02:00
Tomi Valkeinen 63cf28ac3e OMAP: DSS2: fix get_dsi/dispc_clk_source() usage
After changing the selection of DSI and DISPC clock source the users of
get_dsi/dispc_clk_source() functions were left unchanged.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-02-23 17:43:39 +02:00