drm/msm/sde: Fix deadlock due to input handler

Input handler work is currently queue in disp thread.
There is corner case where if input event work is
queued to disp thread (commit thread) while going
into suspend (which happens in commit thread) then
deadlock might happen. Fix this by queueing input
handler into event thread.

Below is the stack trace:

Thread1:

__switch_to+0x90/0xc4
__schedule+0x2a8/0x824
schedule+0x38/0x9c
schedule_timeout+0x1d8/0x400
wait_for_common+0xb4/0x15c
wait_for_completion+0x14/0x1c
kthread_flush_work+0x100/0x178
msm_atomic_commit+0x8ac/0x8c4
drm_atomic_commit+0x50/0x5c
drm_mode_atomic_ioctl+0x8ec/0x958
drm_ioctl+0x1d0/0x430
do_vfs_ioctl+0xb8/0x800
SyS_ioctl+0x84/0x98

Thread2:

__switch_to+0x90/0xc4
__schedule+0x2a8/0x824
schedule+0x38/0x9c
schedule_timeout+0x1d8/0x400
wait_for_common+0xb4/0x15c
wait_for_completion+0x14/0x1c
kthread_flush_work+0x100/0x178
sde_encoder_virt_disable+0x184/0x2b8
msm_atomic_helper_commit_modeset_disables+0x160/0x570
complete_commit+0x6c/0x660
_msm_drm_commit_work_cb+0x40/0x1b8
kthread_worker_fn+0x88/0x1a8
kthread+0xe0/0xf4
cpu_switch_to+0x220/0x2490

Change-Id: If09bd1dfcffb20c4478a052bf7fd644fcf3dbf02
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
1 file changed