diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2015-05-04 07:13:56 -0400 |
---|---|---|
committer | Ishan Mittal <imittal@nvidia.com> | 2015-05-18 02:03:38 -0400 |
commit | d9854e4782b72247f80b64669d00289592cf4dbc (patch) | |
tree | d4c71a577ae0b428c52b66c426aa002f086c68b0 | |
parent | 8d177e7b744acfbe9740af1082397a0f6baa88ae (diff) |
gpu: nvgpu: jump to fail path if pm_runtime_get_sync() fails
Currently we execute pm_runtime_get_sync() and then
gk20a_scale_notify_busy() without checking return value of
pm_runtime_get_sync()
In case of shutdown of GPU is already initiate, we get
a hard hang due to this as per below sequence :
- one thread invokes GPU shutdown and then forcibly rail
gates the GPU
- another thread (unaware of shutdown) calls gk20a_busy()
- since runtime PM is disabled in shutdown path,
pm_runtime_get_sync() fails
- but we still go on running gk20a_scale_notify_busy() which
tries to access some GPU registers and hangs
Fix this by jumping to failure path in case
pm_runtime_get_sync() fails
Bug 200099940
Change-Id: I022f2dfa9408f640fb44e6f4b10a437688779c0a
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/738509
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index d3114ecd..0f2b576d 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -1708,6 +1708,7 @@ int gk20a_busy(struct platform_device *pdev) | |||
1708 | pm_runtime_put_noidle(&pdev->dev); | 1708 | pm_runtime_put_noidle(&pdev->dev); |
1709 | if (platform->idle) | 1709 | if (platform->idle) |
1710 | platform->idle(pdev); | 1710 | platform->idle(pdev); |
1711 | goto fail; | ||
1711 | } | 1712 | } |
1712 | #else | 1713 | #else |
1713 | if (!g->power_on) { | 1714 | if (!g->power_on) { |