diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index b36beb52..2adf8908 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -1658,9 +1658,20 @@ int gk20a_do_idle(void) | |||
1658 | pm_runtime_put_sync(&pdev->dev); | 1658 | pm_runtime_put_sync(&pdev->dev); |
1659 | 1659 | ||
1660 | /* add sufficient delay to allow GPU to rail gate */ | 1660 | /* add sufficient delay to allow GPU to rail gate */ |
1661 | mdelay(platform->railgate_delay + 100); | 1661 | mdelay(platform->railgate_delay); |
1662 | 1662 | ||
1663 | return 0; | 1663 | if (platform->is_railgated(pdev)) |
1664 | return 0; | ||
1665 | else { | ||
1666 | /* wait for some more time */ | ||
1667 | mdelay(100); | ||
1668 | if (platform->is_railgated(pdev)) | ||
1669 | return 0; | ||
1670 | } | ||
1671 | |||
1672 | /* GPU is not rail gated by now, return error */ | ||
1673 | up_write(&g->busy_lock); | ||
1674 | return -EBUSY; | ||
1664 | 1675 | ||
1665 | fail: | 1676 | fail: |
1666 | pm_runtime_put_noidle(&pdev->dev); | 1677 | pm_runtime_put_noidle(&pdev->dev); |