diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 76237fae..b7357c6b 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -1629,7 +1629,7 @@ void gk20a_reset(struct gk20a *g, u32 units) | |||
1629 | * | 1629 | * |
1630 | * In success, this call MUST be balanced by caller with __gk20a_do_unidle() | 1630 | * In success, this call MUST be balanced by caller with __gk20a_do_unidle() |
1631 | */ | 1631 | */ |
1632 | int __gk20a_do_idle(struct platform_device *pdev) | 1632 | int __gk20a_do_idle(struct platform_device *pdev, bool force_reset) |
1633 | { | 1633 | { |
1634 | struct gk20a *g = get_gk20a(pdev); | 1634 | struct gk20a *g = get_gk20a(pdev); |
1635 | struct gk20a_platform *platform = dev_get_drvdata(&pdev->dev); | 1635 | struct gk20a_platform *platform = dev_get_drvdata(&pdev->dev); |
@@ -1648,6 +1648,9 @@ int __gk20a_do_idle(struct platform_device *pdev) | |||
1648 | if (platform->is_railgated(pdev)) | 1648 | if (platform->is_railgated(pdev)) |
1649 | return 0; | 1649 | return 0; |
1650 | 1650 | ||
1651 | /* check if global force_reset flag is set */ | ||
1652 | force_reset |= platform->force_reset_in_do_idle; | ||
1653 | |||
1651 | /* prevent suspend by incrementing usage counter */ | 1654 | /* prevent suspend by incrementing usage counter */ |
1652 | pm_runtime_get_noresume(&pdev->dev); | 1655 | pm_runtime_get_noresume(&pdev->dev); |
1653 | 1656 | ||
@@ -1674,7 +1677,7 @@ int __gk20a_do_idle(struct platform_device *pdev) | |||
1674 | */ | 1677 | */ |
1675 | pm_runtime_put_sync(&pdev->dev); | 1678 | pm_runtime_put_sync(&pdev->dev); |
1676 | 1679 | ||
1677 | if (platform->can_railgate && !platform->force_reset_in_do_idle) { | 1680 | if (platform->can_railgate && !force_reset) { |
1678 | /* add sufficient delay to allow GPU to rail gate */ | 1681 | /* add sufficient delay to allow GPU to rail gate */ |
1679 | msleep(platform->railgate_delay); | 1682 | msleep(platform->railgate_delay); |
1680 | 1683 | ||
@@ -1727,7 +1730,7 @@ int gk20a_do_idle(void) | |||
1727 | of_find_matching_node(NULL, tegra_gk20a_of_match); | 1730 | of_find_matching_node(NULL, tegra_gk20a_of_match); |
1728 | struct platform_device *pdev = of_find_device_by_node(node); | 1731 | struct platform_device *pdev = of_find_device_by_node(node); |
1729 | 1732 | ||
1730 | int ret = __gk20a_do_idle(pdev); | 1733 | int ret = __gk20a_do_idle(pdev, true); |
1731 | 1734 | ||
1732 | of_node_put(node); | 1735 | of_node_put(node); |
1733 | 1736 | ||