]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
video: tegra: dc: protect vsync code with lp_lock
authorAllen Yu <alleny@nvidia.com>
Mon, 21 Jul 2014 05:04:23 +0000 (13:04 +0800)
committerTodd Poynter <tpoynter@nvidia.com>
Sat, 11 Oct 2014 04:48:11 +0000 (21:48 -0700)
commitd66ff5f76b888db1d5efe3ac5e0fcd13893921c3
treed1cf7f9fa69a7b13532f4a43e78c167952001e5f
parent298f2ec2afc4275a1321fe2c0e9fe50d71015cc2
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>
drivers/video/tegra/dc/dc.c
drivers/video/tegra/dc/dc_priv_defs.h
drivers/video/tegra/dc/dsi.c