summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2014-11-03 04:05:53 -0500
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:12:00 -0400
commitc3661adef806869a7e0df884fc621c48436961d4 (patch)
treef5dae90d31852f8c49eb9bdab4b206c347dc1149 /drivers/gpu/nvgpu/gk20a/gk20a.c
parentca95cc76bbaf0d15804d554a9ebfcc708a20c8c4 (diff)
gpu: nvgpu: fix reset clock in gm20b
To assert reset on GPU, we store "gpu_ref" clock in platform->clk[0] and use it to assert/deassert reset But for gm20b, "gpu_ref" is no longer resettable. To fix this, add two callbacks in gk20a_platform : .reset_assert and .reset_deassert Also, add a pointer "clk_reset" to store the clock which needs to be reset For gk20a specific implementation, we continue to reset platform->clk[0] For gm20b specific implementation, we first request "gpu_gate" clock, store it and use it to assert reset Bug 1513685 Bug 1517584 Change-Id: I15a583a4a07eb663b442084be8b8c7d0c7c7a142 Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index d411d011..c7d40fcd 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -1671,10 +1671,14 @@ int __gk20a_do_idle(struct platform_device *pdev)
1671 else 1671 else
1672 goto fail_timeout; 1672 goto fail_timeout;
1673 } else { 1673 } else {
1674 if (!platform->reset_assert || !platform->reset_deassert)
1675 goto fail_timeout;
1676
1674 pm_runtime_get_sync(&pdev->dev); 1677 pm_runtime_get_sync(&pdev->dev);
1675 gk20a_pm_prepare_poweroff(&pdev->dev); 1678 gk20a_pm_prepare_poweroff(&pdev->dev);
1676 1679
1677 tegra_periph_reset_assert(platform->clk[0]); 1680 platform->reset_assert(pdev);
1681
1678 udelay(10); 1682 udelay(10);
1679 1683
1680 g->forced_reset = true; 1684 g->forced_reset = true;
@@ -1717,7 +1721,7 @@ int __gk20a_do_unidle(struct platform_device *pdev)
1717 struct gk20a_platform *platform = dev_get_drvdata(&pdev->dev); 1721 struct gk20a_platform *platform = dev_get_drvdata(&pdev->dev);
1718 1722
1719 if (g->forced_reset) { 1723 if (g->forced_reset) {
1720 tegra_periph_reset_deassert(platform->clk[0]); 1724 platform->reset_deassert(pdev);
1721 1725
1722 gk20a_pm_finalize_poweron(&pdev->dev); 1726 gk20a_pm_finalize_poweron(&pdev->dev);
1723 pm_runtime_put_sync(&pdev->dev); 1727 pm_runtime_put_sync(&pdev->dev);