drm/msm/dp: synchronize the USBPD and display thread events

Synchronize the USBPD and display thread event paths using a lock
to protect the power on state variable. This will fix any
potential race condition caused by the USBPD thread cleaning up
the driver state during a disconnect event when the display
thread is delayed or blocked indefinitely. Furthermore, trigger
the controller module to stop all operations e.g. link training,
in event that there is a software time out before the display
thread is done powering on the controller.

CRs-Fixed: 2115876
Change-Id: Idcf3be54a22ba8532e7bc0560fbcec6d2c99869d
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2 files changed