diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2014-06-11 09:52:51 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:10:12 -0400 |
commit | bce383801c0f93c3095c83a7209d7ab61edceca8 (patch) | |
tree | 1ae4ae0ec24526dc80f44b234edda3af6a9eb9bd /drivers/gpu | |
parent | d8e7600ed884b5bacb042f66c9b1044f24da3997 (diff) |
gpu: nvgpu: bail out from poweroff if channel suspend fails
During gk20a_pm_prepare_poweroff(), if call to gk20a_channel_suspend()
fails, we proceed to disable other components and then return error.
But when genpd sees the error, it will abort the suspend sequence and
keep the device state as active.
But since we have already disabled all the components, GPU lands in
invalid state.
Hence, if channel_suspend() fails then do not proceed but return
the error immediately
Bug 200010416
Change-Id: I553a2a25832a1be4941bb6b6ce490c950cdbe7fa
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/422248
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 8e142e6e..c13c9614 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -754,7 +754,9 @@ static int gk20a_pm_prepare_poweroff(struct device *dev) | |||
754 | if (!g->power_on) | 754 | if (!g->power_on) |
755 | return 0; | 755 | return 0; |
756 | 756 | ||
757 | ret |= gk20a_channel_suspend(g); | 757 | ret = gk20a_channel_suspend(g); |
758 | if (ret) | ||
759 | return ret; | ||
758 | 760 | ||
759 | /* | 761 | /* |
760 | * After this point, gk20a interrupts should not get | 762 | * After this point, gk20a interrupts should not get |