video: tegra: gk20a: Fix protected elpg race.
authorPrashant Malani <pmalani@nvidia.com>
Tue, 4 Feb 2014 20:39:45 +0000 (12:39 -0800)
committerTerje Bergstrom <tbergstrom@nvidia.com>
Fri, 7 Feb 2014 08:21:09 +0000 (00:21 -0800)
commit782db693dfc5c70a1d327e52bec167309344ac19
treed3c41137bc95d85061e1c5b6fa3ad3462bd4537f
parent2e12a783928d9077f0341e76a3bc313476d76cdd
video: tegra: gk20a: Fix protected elpg race.

Protected elpg calls can be pre-empted in the middle by the deferred
pg_init. This can lead to refcounting errors, which will result in elpg
always remaining on.

Therefore we protect the relevant sections of elpg setup in the deferred
work with a mutex.

Change-Id: I55746412885a09f7dbccd577f0c30d0d1102fe54
Signed-off-by: Prashant Malani <pmalani@nvidia.com>
Reviewed-on: http://git-master/r/363424
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
drivers/video/tegra/host/gk20a/gr_gk20a.h
drivers/video/tegra/host/gk20a/pmu_gk20a.c
drivers/video/tegra/host/gk20a/pmu_gk20a.h