summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2015-10-20 07:45:52 -0400
committerSachin Nikam <snikam@nvidia.com>2015-10-26 07:03:56 -0400
commit3684ed8fd65ea3a13a99dc17c036899ba3165a44 (patch)
treeb8ae0649059a4e8a06c0ffc59d25ce35676f50b5 /drivers
parent0334d7e30385187517c01a63a71dc11fa934c102 (diff)
gpu: nvgpu: use railgate instead of reset_assert
In gk20a_do_idle(), if can_railgate = false, we do reset_assert() on the GPU But asserting reset might have dependencies on specific h/w seqeunce for ensuring proper reset Hence avoid calling reset_assert() and directly call platform specific unrailgate() and railgate() APIs which take care of the correct reset sequence Bug 200142989 Bug 200137963 Bug 1678611 Change-Id: Ide886dd88b8422ad36de52d54378b1edd9c7bbd6 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/820322 (cherry picked from commit d621ddd49da976a75c14aa7aaa37f700fb4e83f2) Reviewed-on: http://git-master/r/822515 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c22
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);