diff options
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index a44ce996..0d74099e 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -1854,23 +1854,23 @@ int __gk20a_do_idle(struct platform_device *pdev, bool force_reset) | |||
1854 | } else { | 1854 | } else { |
1855 | /* | 1855 | /* |
1856 | * Case 2 : GPU railgate is not supported or we explicitly | 1856 | * Case 2 : GPU railgate is not supported or we explicitly |
1857 | * do not want to do railgate | 1857 | * do not want to depend on runtime PM |
1858 | * | 1858 | * |
1859 | * if GPU is now idle, call prepare_poweroff() to save the | 1859 | * if GPU is now idle, call prepare_poweroff() to save the |
1860 | * state and then assert the reset | 1860 | * state and then do explicit railgate |
1861 | * | 1861 | * |
1862 | * __gk20a_do_unidle() needs to deassert reset, call | 1862 | * __gk20a_do_unidle() needs to unrailgate, call |
1863 | * finalize_poweron(), and then call pm_runtime_put_sync() | 1863 | * finalize_poweron(), and then call pm_runtime_put_sync() |
1864 | * to balance the GPU usage counter | 1864 | * to balance the GPU usage counter |
1865 | */ | 1865 | */ |
1866 | if (!platform->reset_assert || !platform->reset_deassert) | ||
1867 | goto fail_drop_usage_count; | ||
1868 | 1866 | ||
1869 | /* Save the GPU state */ | 1867 | /* Save the GPU state */ |
1870 | gk20a_pm_prepare_poweroff(&pdev->dev); | 1868 | gk20a_pm_prepare_poweroff(&pdev->dev); |
1871 | 1869 | ||
1872 | /* assert GPU reset */ | 1870 | gk20a_pm_disable_clk(&pdev->dev); |
1873 | platform->reset_assert(pdev); | 1871 | |
1872 | /* railgate GPU */ | ||
1873 | platform->railgate(pdev); | ||
1874 | 1874 | ||
1875 | udelay(10); | 1875 | udelay(10); |
1876 | 1876 | ||
@@ -1915,10 +1915,12 @@ int __gk20a_do_unidle(struct platform_device *pdev) | |||
1915 | 1915 | ||
1916 | if (g->forced_reset) { | 1916 | if (g->forced_reset) { |
1917 | /* | 1917 | /* |
1918 | * If we did a reset (and not railgate), | 1918 | * If we did a forced-reset/railgate |
1919 | * then deassert the GPU reset here first | 1919 | * then unrailgate the GPU here first |
1920 | */ | 1920 | */ |
1921 | platform->reset_deassert(pdev); | 1921 | platform->unrailgate(pdev); |
1922 | |||
1923 | gk20a_pm_enable_clk(&pdev->dev); | ||
1922 | 1924 | ||
1923 | /* restore the GPU state */ | 1925 | /* restore the GPU state */ |
1924 | gk20a_pm_finalize_poweron(&pdev->dev); | 1926 | gk20a_pm_finalize_poweron(&pdev->dev); |