diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-01-17 02:10:52 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-01-17 12:24:07 -0500 |
commit | 4942cc4222ef2049f5596b87ae9007123cdcdedb (patch) | |
tree | c589e48f579eaeb27dc822f05e62f9dd4c3ce6ce /drivers/gpu/nvgpu | |
parent | 9c0c4dcf3f648509e10640a02efb35f8d0ffe074 (diff) |
gpu: nvgpu: wait for idle in shutdown
In gk20a_pm_shutdown(), we currently do not wait
for IOCTLs or threads in progress and directly
proceed with shutdown sequence
This can cause random hangs during system shutdown
Fix this by calling gk20a_wait_for_idle() after
we disable runtime PM in gk20a_pm_shutdown()
Bug 200260926
Change-Id: I0f06ba9232263fcb09c6e9d246be89deec053d44
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1286522
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index f2094bfa..5f365d4b 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -1390,6 +1390,8 @@ static void gk20a_pm_shutdown(struct platform_device *pdev) | |||
1390 | /* Prevent more requests by disabling Runtime PM */ | 1390 | /* Prevent more requests by disabling Runtime PM */ |
1391 | __pm_runtime_disable(&pdev->dev, false); | 1391 | __pm_runtime_disable(&pdev->dev, false); |
1392 | 1392 | ||
1393 | gk20a_wait_for_idle(&pdev->dev); | ||
1394 | |||
1393 | /* Be ready for rail-gate after this point */ | 1395 | /* Be ready for rail-gate after this point */ |
1394 | if (gk20a_gpu_is_virtual(&pdev->dev)) | 1396 | if (gk20a_gpu_is_virtual(&pdev->dev)) |
1395 | vgpu_pm_prepare_poweroff(&pdev->dev); | 1397 | vgpu_pm_prepare_poweroff(&pdev->dev); |