video: tegra: host: Fix race in gr3d scaling
authorArto Merilainen <amerilainen@nvidia.com>
Tue, 1 Oct 2013 12:33:24 +0000 (15:33 +0300)
committerGabby Lee <galee@nvidia.com>
Tue, 14 Jan 2014 10:50:42 +0000 (02:50 -0800)
commit372e30250fda1a4dc08bd9ca5997b76c6ae5e170
tree23c5681f67f0f244b5739389a7b843a35ad643d6
parent95e95492aed2a09456a379b826ee064cada67fdd
video: tegra: host: Fix race in gr3d scaling

The scaling code used cancel_work_sync() while holding a mutex. As the work
itself uses the same mutex, we risk causing a deadlock.

This patch refactors the code so that the mutex is not hold while calling
cancel_work_sync().

Bug 1371500

Change-Id: I3aa0de168cebcc1d8d1843813caee5e82fe3df06
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/280730
(cherry picked from commit 763125fba1c9a8a67a9968c8502c17465665eb35)
Reviewed-on: http://git-master/r/354208
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Gabby Lee <galee@nvidia.com>
Reviewed-by: Min-wuk Lee <mlee@nvidia.com>
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
drivers/video/tegra/host/gr3d/pod_scaling.c