video: tegra: dc: protect vsync code with lp_lock
There is a gap in vsycn code (wait for user vblank completion) that is not
and can not be protected by dc->lock. So there might be races between vsync
code and PM code. For example, if tegra_dsi_host_suspend() or tegra_dc_disable()
is called while vsync thread is waiting for the completion, dc clock will be
disabled as we drop all references to dc clock in _suspend() or _disable().
Fix description:
- Rename one_shot_lp_lock to lp_lock as we need it for continuous mode as well.
- Protect vsync code with lp_lock to eliminate races with PM code path.
Bug
200009462
Change-Id: I4c6c44b9550cfc62862ad5e1988869fbf7e43a77
Signed-off-by: Allen Yu <alleny@nvidia.com>
Reviewed-on: http://git-master/r/440174
(cherry picked from commit
316e9431b9393290b829c7254d306d62a3ce5942)
Reviewed-on: http://git-master/r/553751
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
Tested-by: Todd Poynter <tpoynter@nvidia.com>