linux/drivers/video/omap2/dss
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
..
core.c OMAP: DSS2: Fix omap_dss_probe() error path 2010-05-18 15:06:09 +03:00
dispc.c OMAP: DSS2: clear spurious SYNC_LOST_DIGIT interrupts 2010-08-03 15:18:45 +03:00
display.c OMAP: DSS2: Check if display supports update mode changes 2010-08-03 15:18:45 +03:00
dpi.c OMAP: DSS2: move timing functions 2010-02-24 14:31:28 +02:00
dsi.c OMAP: DSS2: DSI: use a private workqueue 2010-08-03 15:18:46 +03:00
dss.c OMAP3630: DSS2: Updating MAX divider value 2010-05-18 15:06:06 +03:00
dss.h OMAP: DSS2: omap_dss_probe() conditional compilation cleanup 2010-05-18 15:06:08 +03:00
Kconfig OMAP: DSS2: Add Kconfig option for DPI display type 2010-05-18 14:14:29 +03:00
Makefile OMAP: DSS2: Add Kconfig option for DPI display type 2010-05-18 14:14:29 +03:00
manager.c OMAP: DSS2: Fix update area calculations with multiple scaled overlays 2010-08-03 15:18:45 +03:00
overlay.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
rfbi.c OMAP: DSS2: move enable/disable/suspend/resume 2010-02-24 14:31:28 +02:00
sdi.c OMAP: DSS2: Use vdds_sdi regulator supply in SDI 2010-05-18 14:14:29 +03:00
venc.c OMAP: DSS2: VENC: don't call platform_enable/disable() twice 2010-05-18 14:14:30 +03:00