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
..
2010-05-25 08:07:08 -07:00
2010-05-27 09:12:42 -07:00
2010-05-25 08:07:08 -07:00
2009-12-16 07:20:04 -08:00
2010-05-03 15:42:58 +02:00
2010-07-26 19:08:13 +01:00
2010-05-25 08:07:08 -07:00
2010-05-25 08:07:09 -07:00
2010-06-04 15:21:45 -07:00
2010-02-27 18:31:16 +01:00
2010-02-27 18:31:14 +01:00
2010-03-12 15:52:34 -08:00
2010-05-25 08:07:09 -07:00
2010-05-27 09:12:42 -07:00
2010-05-25 08:07:09 -07:00
2010-02-09 11:13:56 +01:00
2010-02-27 18:31:13 +01:00
2010-02-27 18:31:13 +01:00
2010-05-25 08:07:08 -07:00
2010-05-25 08:07:08 -07:00
2010-05-25 08:07:08 -07:00