OSDN Git Service

msm: mdss: initialize the DP thread structures before kthread_run
authorPadmanabhan Komanduru <pkomandu@codeaurora.org>
Thu, 23 Feb 2017 13:05:50 +0000 (18:35 +0530)
committerPadmanabhan Komanduru <pkomandu@codeaurora.org>
Thu, 23 Feb 2017 13:13:42 +0000 (18:43 +0530)
commitf5c6660db6cbffbbebdd8fd94b3b2dd8f951c488
tree5280bf6edcc9af5024b8177bba8ce1df3cfb67dc
parentd72462d943ee499ac17a485bdacca60c0db31c04
msm: mdss: initialize the DP thread structures before kthread_run

The DP event thread has workqueue and spinlock resources which are
initialized as part of the kthread event. This can cause a race
condition where the spinlock is accessed during EV_USBPD_DISCOVER_MODES
event at the end of DP probe sequence before it is initialized. This is
because kthread_run API doesn't guarantee the execution of DP event
thread to the point where spinlock is initialized before the function
call returns. Hence, initialize the DP thread resources before the
kthread_run.

Change-Id: I05711c33a896d409d4417d09973c6dfec61e818f
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
drivers/video/fbdev/msm/mdss_dp.c