]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
video: tegra: host: Fix deferred ELPG enable
authorArto Merilainen <amerilainen@nvidia.com>
Thu, 31 Oct 2013 15:51:00 +0000 (17:51 +0200)
committerMitch Luban <mluban@nvidia.com>
Mon, 4 Nov 2013 19:43:40 +0000 (11:43 -0800)
commitc9946a79f856a95fa6c8faf33ca2d97962e4ba56
tree7f89032a44f19e68f5081aa80a987a7988a6e291
parenta5b4278de0c54fad27a0c3dd83769aa20e169a7c
video: tegra: host: Fix deferred ELPG enable

Deferred ELPG enable has effectively been broken. The variable
elpg_enable_allow has never been cleared and hence ELPG has always
been instantaneous operation.

This patch also accounts few issues related to deferred ELPG enabling:
- The reference count has not been balanced if we enable ELPG in
deferred fashion. This may cause ELPG to be leaved on when it should
be turned off
- Locking has not been proper in deferred ELPG enablement. This patch
modifies the code so that we don't unnecessarily release the lock
when enabling ELPG.
- We give a warning if something suspicious occurs while enabling/
disabling ELPG (i.e. disable call does not lead to actually disabling
ELPG)

Bug 1398567

Change-Id: I67de6708f06e51ce814cdb8a7f156e29929e05cf
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/310103
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Eric Eells <eeells@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
drivers/video/tegra/host/gk20a/pmu_gk20a.c