gpu: nvgpu: force idle if railgate not supported

Add a way to force idle and reset the GPU in case where GPU
rail gating is not supported
(i.e. platform->can_railgate = false)

In this case, we follow below sequence :
- once GPU is idle, get runtime reference which enables the clocks
- call prepare_poweroff() to save the state explicitly
- perform explicit reset assert/deassert
- call finalize_poweron() to restore the state
- drop the runtime reference taken earlier

Bug 1525284

Change-Id: Id5f3ec152093acd585631dfbf785d8e0561f9048
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/435620
GVS: Gerrit_Virtual_Submit
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
Tested-by: Arto Merilainen <amerilainen@nvidia.com>
This commit is contained in:
Deepak Nibade
2014-07-08 18:00:18 +05:30
committed by Dan Willemsen
parent 597083eaba
commit fec60b6e6e
2 changed files with 36 additions and 15 deletions

View File

@@ -271,6 +271,7 @@ struct gk20a {
bool elpg_enabled;
bool aelpg_enabled;
bool forced_idle;
bool forced_reset;
#ifdef CONFIG_DEBUG_FS
spinlock_t debugfs_lock;