media: tegra: nvavp: fix deadlock issue
In nvavp_pushbuffer_update(), we acquire channel_info->pushbuffer_lock first
then nvavp->open_lock. While in clock_disable_handler(), open_lock is acquired
before pushbuffer_lock, causing the deadlock if clock_disable_work happens to
be executing while running nvavp_pushbuffer_update().
This change reorder the locks in clock_disable_handler to avoid deadlock issue.
And also in tegra_nvavp_release(), need to release nvavp->open_lock first before
calling nvavp_uninit(), since nvavp_uninit() need to cancel clock_disable_work
in a synchronous manner.
Bug
200013513
Change-Id: I42082a97cc4e311a4141559f8a56c7c1eeb97eb2
Signed-off-by: Allen Yu <alleny@nvidia.com>
Reviewed-on: http://git-master/r/433523
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Soumenkumar Dey <sdey@nvidia.com>
Reviewed-by: Mandar Potdar <mpotdar@nvidia.com>
Tested-by: Yogesh Solanke <ysolanke@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Somu Sundaram <somasundarams@nvidia.com>