mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: add railgate check in do_idle()
In gk20a_do_idle(), check gk20a rail status before returning. If rail is off, then only return success otherwise return failure Bug 1376916 Bug 1487804 Change-Id: I6280bf06c686b8baa4d6f49e90f47148411c3e02 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/415281 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Shridhar Rasal <srasal@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
Dan Willemsen
parent
954117fe11
commit
3f7be93dab
@@ -1658,9 +1658,20 @@ int gk20a_do_idle(void)
|
||||
pm_runtime_put_sync(&pdev->dev);
|
||||
|
||||
/* add sufficient delay to allow GPU to rail gate */
|
||||
mdelay(platform->railgate_delay + 100);
|
||||
mdelay(platform->railgate_delay);
|
||||
|
||||
return 0;
|
||||
if (platform->is_railgated(pdev))
|
||||
return 0;
|
||||
else {
|
||||
/* wait for some more time */
|
||||
mdelay(100);
|
||||
if (platform->is_railgated(pdev))
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* GPU is not rail gated by now, return error */
|
||||
up_write(&g->busy_lock);
|
||||
return -EBUSY;
|
||||
|
||||
fail:
|
||||
pm_runtime_put_noidle(&pdev->dev);
|
||||
|
||||
Reference in New Issue
Block a user