mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
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>
This commit is contained in:
committed by
Sachin Nikam
parent
0334d7e303
commit
3684ed8fd6
@@ -1854,23 +1854,23 @@ int __gk20a_do_idle(struct platform_device *pdev, bool force_reset)
|
||||
} else {
|
||||
/*
|
||||
* Case 2 : GPU railgate is not supported or we explicitly
|
||||
* do not want to do railgate
|
||||
* do not want to depend on runtime PM
|
||||
*
|
||||
* if GPU is now idle, call prepare_poweroff() to save the
|
||||
* state and then assert the reset
|
||||
* state and then do explicit railgate
|
||||
*
|
||||
* __gk20a_do_unidle() needs to deassert reset, call
|
||||
* __gk20a_do_unidle() needs to unrailgate, call
|
||||
* finalize_poweron(), and then call pm_runtime_put_sync()
|
||||
* to balance the GPU usage counter
|
||||
*/
|
||||
if (!platform->reset_assert || !platform->reset_deassert)
|
||||
goto fail_drop_usage_count;
|
||||
|
||||
/* Save the GPU state */
|
||||
gk20a_pm_prepare_poweroff(&pdev->dev);
|
||||
|
||||
/* assert GPU reset */
|
||||
platform->reset_assert(pdev);
|
||||
gk20a_pm_disable_clk(&pdev->dev);
|
||||
|
||||
/* railgate GPU */
|
||||
platform->railgate(pdev);
|
||||
|
||||
udelay(10);
|
||||
|
||||
@@ -1915,10 +1915,12 @@ int __gk20a_do_unidle(struct platform_device *pdev)
|
||||
|
||||
if (g->forced_reset) {
|
||||
/*
|
||||
* If we did a reset (and not railgate),
|
||||
* then deassert the GPU reset here first
|
||||
* If we did a forced-reset/railgate
|
||||
* then unrailgate the GPU here first
|
||||
*/
|
||||
platform->reset_deassert(pdev);
|
||||
platform->unrailgate(pdev);
|
||||
|
||||
gk20a_pm_enable_clk(&pdev->dev);
|
||||
|
||||
/* restore the GPU state */
|
||||
gk20a_pm_finalize_poweron(&pdev->dev);
|
||||
|
||||
Reference in New Issue
Block a user