aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2
Commit message (Collapse)AuthorAge
* Merge branch 'for-linus' of git://gitorious.org/linux-omap-dss2/linuxLinus Torvalds2010-08-08
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for-linus' of git://gitorious.org/linux-omap-dss2/linux: (64 commits) OMAP: DSS2: OMAPFB: add support for FBIO_WAITFORVSYNC OMAP: DSS2: Replace strncmp() with sysfs_streq() in overlay_manager_store() OMAP: DSS2: Fix error path in omap_dsi_update() OMAP: DSS2: TDO35S: fix video signaling OMAP: DSS2: OMAPFB: Fix invalid bpp for PAL and NTSC modes OMAP: DSS2: OMAPFB: Fix probe error path OMAP3EVM: Replace vdvi regulator supply with vdds_dsi OMAP: DSS2: Remove extra return statement OMAP: DSS2: adjust YUV overlay width to be even OMAP: DSS2: OMAPFB: Fix sysfs mirror input check OMAP: DSS2: OMAPFB: Remove redundant color register range check OMAP: DSS2: OMAPFB: Remove redundant rotate range check OMAP: DSS2: OMAPFB: Check fb2display() return value OMAP: DSS2: Taal: Optimize enable_te, rotate, mirror when value unchanged OMAP: DSS2: DSI: detect unsupported update requests OMAP: DSS2: DSI: increase FIFO low threshold OMAP: DSS2: DSI: Add error IRQ mask for DSI complexIO OMAP: DSS2: DSI: Remove BTA after set_max_rx_packet_size OMAP: DSS2: change manual update scaling setup OMAP: DSS2: DSI: use BTA to end the frame transfer ...
| * OMAP: DSS2: OMAPFB: add support for FBIO_WAITFORVSYNCGrazvydas Ignotas2010-08-05
| | | | | | | | | | | | | | | | FBIO_WAITFORVSYNC is a stardard ioctl for waiting vsync, already used by some userspace, so add it as an alias for OMAPFB_WAITFORVSYNC. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
| * OMAP: DSS2: Replace strncmp() with sysfs_streq() in overlay_manager_store()Archit Taneja2010-08-05
| | | | | | | | | | | | | | | | | | | | | | | | The function overlay_manager_store currently fails if the sysfs input is a prefix string of an existing overlay manager name. This occurs because strncmp compares the two strings only till the length of the input sysfs string. So a sysfs input "lcd" will match manager name "lcd2" which is incorrect behavior. The use of sysfs_streq here will prevent this false positive match to occur. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
| * OMAP: DSS2: Fix error path in omap_dsi_update()Archit Taneja2010-08-05
| | | | | | | | | | | | | | | | | | In the case of an error on calling dsi_update_screen_l4(), a successful framedone callback is still sent to panel-taal. An error should be returned to taal_update() instead. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
| * OMAP: DSS2: TDO35S: fix video signalingIgor Grinberg2010-08-05
| | | | | | | | | | | | | | | | | | TDO35S samples the data on the falling adge of the pixel clock, therefore the data strobe should be on the raising edge. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
| * OMAP: DSS2: OMAPFB: Fix invalid bpp for PAL and NTSC modesMaurus Cuelenaere2010-08-05
| | | | | | | | | | | | | | | | | | omapfb_mode_to_timings() sets the bpp to 0 when bootarg omapfb.mode is set to either "pal" or "ntsc". This patch corrects this by setting the bpp to 24, as would be done if omapdss_default_get_recommended_bpp() would be called. Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
| * OMAP: DSS2: OMAPFB: Fix probe error pathAfzal Mohammed2010-08-05
| | | | | | | | | | | | | | | | | | Move sysfs entry creation to omapfb_probe() from omapfb_create_framebuffers(). This will make sure that sysfs entry is not left behind in case of unsuccessful probe due to failure in enabling fb0 of omapfb_create_framebuffers(). Signed-off-by: Afzal Mohammed <lazfamam@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
| * OMAP: DSS2: Remove extra return statementArchit Taneja2010-08-05
| | | | | | | | | | | | | | | | Remove extra return statement in omapdss_default_get_recommended_bpp from overlay.c Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
| * OMAP: DSS2: adjust YUV overlay width to be evenTomi Valkeinen2010-08-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An overlay in YUV mode has to have an even input width, because data for each pixel is divided between two adjacent pixels. The algorithm handling manual update overlay adjusting may adjust the overlay width to be odd. This patch adds a check for that situation, and makes the width even. The width is increased by one if it is possible (the unadjusted input width is larger than the width), and decreased by one if increasing is not possible. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
| * OMAP: DSS2: OMAPFB: Fix sysfs mirror input checkJani Nikula2010-08-05
| | | | | | | | | | | | | | | | | | Using bool silently converted input to 0 or 1, making the range check useless. Use unsigned long instead, and convert to bool later. Found by Coverity. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
| * OMAP: DSS2: OMAPFB: Remove redundant color register range checkJani Nikula2010-08-05
| | | | | | | | | | | | | | Unsigned regno can never be less than zero. Found by Coverity. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
| * OMAP: DSS2: OMAPFB: Remove redundant rotate range checkJani Nikula2010-08-05
| | | | | | | | | | | | | | Unsigned rotate can never be less than zero. Found by Coverity. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
| * OMAP: DSS2: OMAPFB: Check fb2display() return valueJani Nikula2010-08-05
| | | | | | | | | | | | | | | | Make sure NULL return value of fb2display() is not referenced. Found by Coverity. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
| * OMAP: DSS2: Taal: Optimize enable_te, rotate, mirror when value unchangedTomi Valkeinen2010-08-05
| | | | | | | | | | | | | | | | Skip any further processing of taal_enable_te(), taal_rotate(), and taal_mirror() if value remains unchanged. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
| * OMAP: DSS2: DSI: detect unsupported update requestsTomi Valkeinen2010-08-05
| | | | | | | | | | | | | | | | | | | | | | OMAP DSS HW cannot send updates with odd widths. Normally the widths are made even while preparing the update. This patch adds a BUG_ON() to check if the update width is even. This is to detect broken updates cleanly, as otherwise the OMAP DSS HW will just halt, leading to obscure error situations. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
| * OMAP: DSS2: DSI: increase FIFO low thresholdTomi Valkeinen2010-08-05
| | | | | | | | | | | | | | | | | | | | | | The current FIFO low threshold was too low, and caused the FIFO to run empty when core domain went to INA state between FIFO fills. This patch increases the low threshold to keep that from happening. The threshold values depend quite much on the HW and the use cases, so this should actually be somehow configurable from board files, perhaps. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
| * OMAP: DSS2: DSI: Add error IRQ mask for DSI complexIOTomi Valkeinen2010-08-05
| | | | | | | | | | | | | | 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>
| * OMAP: DSS2: DSI: Remove BTA after set_max_rx_packet_sizeTomi Valkeinen2010-08-05
| | | | | | | | | | | | | | | | 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>
| * OMAP: DSS2: change manual update scaling setupTomi Valkeinen2010-08-05
| | | | | | | | | | | | | | | | 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>
| * OMAP: DSS2: DSI: use BTA to end the frame transferTomi Valkeinen2010-08-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * OMAP: DSS2: DSI: change dsi_vc_config_l4/vp()Tomi Valkeinen2010-08-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * OMAP: DSS2: DSI: Disable interface when disabling the displayVille Syrjälä2010-08-05
| | | | | | | | | | | | | | | | | | | | 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>
| * OMAP: DSS2: DSI: Wait for DSI PLL clocks to be active before selecting themTomi Valkeinen2010-08-05
| | | | | | | | | | | | | | | | | | | | 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>
| * OMAP: DSS2: DSI: Print an error message if DSI clock calc failsVille Syrjälä2010-08-05
| | | | | | | | | | | | | | | | 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>
| * OMAP: DSS2: DSI: Disable PCKFREE on errorVille Syrjälä2010-08-05
| | | | | | | | | | | | | | | | 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>
| * OMAP: DSS2: Taal: CABC workaround is Taal specificJani Nikula2010-08-03
| | | | | | | | | | | | | | 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>
| * OMAP: DSS2: Taal: Add regulator configuration supportTomi Valkeinen2010-08-03
| | | | | | | | | | | | | | | | 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>
| * OMAP: DSS2: Taal: Print panel name in addition to revisionJani Nikula2010-08-03
| | | | | | | | | | | | | | | | 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>
| * OMAP: DSS2: Taal: Add panel specific configuration structureJani Nikula2010-08-03
| | | | | | | | | | | | | | | | 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>
| * OMAP: DSS2: Taal: Configure ESD check in DSI panel dataJani Nikula2010-08-03
| | | | | | | | | | | | | | | | 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>
| * OMAP: DSS2: Taal: Use Nokia DSI panel dataTomi Valkeinen2010-08-03
| | | | | | | | | | | | | | | | 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>
| * OMAP: DSS2: Taal: Add proper external TE supportJani Nikula2010-08-03
| | | | | | | | | | | | | | 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>
| * OMAP: DSS2: Taal: Change probe error handling labelsJani Nikula2010-08-03
| | | | | | | | | | | | | | | | 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>
| * OMAP: DSS2: Taal: Change ESD work managementJani Nikula2010-08-03
| | | | | | | | | | | | | | | | 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>
| * OMAP: DSS2: Taal: Check taal_power_on() return value in taal_resume()Jani Nikula2010-08-03
| | | | | | | | | | | | | | 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>
| * OMAP: DSS2: Taal: Change DSI bus locking to avoid deadlock in ESD workJani Nikula2010-08-03
| | | | | | | | | | | | | | | | 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>
| * OMAP: DSS2: Taal: Ensure panel is enabled in enable_te() and run_test()Jani Nikula2010-08-03
| | | | | | | | | | | | | | | | 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>
| * OMAP: DSS2: Taal: Improve taal_power_on() error handlingJani Nikula2010-08-03
| | | | | | | | | | | | | | 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>
| * OMAP: DSS2: Taal: Remove ESD work cancel from driver probe error handlingJani Nikula2010-08-03
| | | | | | | | | | | | | | 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>
| * OMAP: DSS2: Taal: Fix request_irq() error handlingJani Nikula2010-08-03
| | | | | | | | | | | | | | 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>
| * OMAP: DSS2: Taal: Remove platform enable/disableJani Nikula2010-08-03
| | | | | | | | | | | | | | | | 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>
| * OMAP: DSS2: Taal: Add locks to protect taal data accessJani Nikula2010-08-03
| | | | | | | | | | | | | | 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>
| * OMAP: DSS2: Taal: Add panel hardware resetJani Nikula2010-08-03
| | | | | | | | | | | | | | | | 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>
| * OMAP: DSS2: Taal: add locks to taal_bl_update_statusTomi Valkeinen2010-08-03
| | | | | | | | | | | | | | | | 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>
| * OMAP: DSS2: DSI: change DSI timeout functionsTomi Valkeinen2010-08-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * OMAP: DSS2: DSI: handle error in synchronous writeTomi Valkeinen2010-08-03
| | | | | | | | | | | | | | 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>
| * OMAP: DSS2: DSI: change dsi_vc_dcs_read_2 parametersTomi Valkeinen2010-08-03
| | | | | | | | | | | | | | 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>
| * OMAP: DSS2: DSI: use a private workqueueTomi Valkeinen2010-08-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * OMAP: DSS2: DSI: print errors in dsi_vc_flush_receive_data()Tomi Valkeinen2010-08-03
| | | | | | | | | | | | | | 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>
| * OMAP: DSS2: OMAPFB: Add some locking debug checksVille Syrjälä2010-08-03
| | | | | | | | | | | | | | | | 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>