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>
This commit is contained in:
Deepak Nibade
2017-01-17 12:40:52 +05:30
committed by mobile promotions
parent 9c0c4dcf3f
commit 4942cc4222

View File

@@ -1390,6 +1390,8 @@ static void gk20a_pm_shutdown(struct platform_device *pdev)
/* Prevent more requests by disabling Runtime PM */
__pm_runtime_disable(&pdev->dev, false);
gk20a_wait_for_idle(&pdev->dev);
/* Be ready for rail-gate after this point */
if (gk20a_gpu_is_virtual(&pdev->dev))
vgpu_pm_prepare_poweroff(&pdev->dev);