msm: mdss: fix race condition between vsync handler and ctl_stop
The ctl_stop and vsync_handler both can run in two different
threads. That can lead to race condition in vsync handler.
-> Core 0: vsync handler thread checks the ctl power status
and get preempted by other priority task.
-> Core 1: processes the ctl_stop and power off the display
device.
-> Core 0: Vsync handler task gets chance to run again and
tries to access the ctl->op members.
The third step leads to invalid structure member access because
display is already powered off. This race condition should be
fixed by moving all power state checks inside mutex lock.
Change-Id: I452c9026074acda2d00954e530fc491d395f106b
Signed-off-by:
Dhaval Patel <pdhaval@codeaurora.org>
Loading
Please register or sign in to comment