msm: mdss: hdmi: proper synchronization between hpd and tx power
Currently, HDMI driver has HPD (Hot Plug Detect) work to handle HPD
interrupts and power off work to handle the Tx power off. Power off
work waits for HPD work to finish if in progress. In case of suspend,
this can lead to a dead lock or power off work might starve for long
time HPD work may take some time to finish resulting in suspend or next
resume to timeout.
Power off work was added to unblock the user thread as it used to take
a long time waiting for audio engine to finish. That part of the code
has been moved to HPD work. Now power off can be synchronous with the
call as now it doesn't account for the delay. This removes the dependency
on other work.
Also, use a separate mutex for power on/off. The existing mutex is being
used in large number of places which are not related. During suspend/resume
use of mutex in places like sysfs read/write might result in longer hold of
the mutex resulting in power off delay which eventually may timeout the
suspend or resume.
Change-Id: Ie1e461f6cb7f90d440bfd203b935cd7dea069b5e
Signed-off-by:
Ajay Singh Parmar <aparmar@codeaurora.org>
Loading
Please register or sign in to comment