summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSumit Singh <sumsingh@nvidia.com>2015-04-24 00:54:23 -0400
committerIshan Mittal <imittal@nvidia.com>2015-05-18 02:01:58 -0400
commit96ffe0c64d88f4f8154322c00823083ef97f3643 (patch)
tree7597ce886d0cba1262af60bdf6094b5f5f811974 /drivers
parent30e47f69841e4b86ffeeae7d1db0cf9503cb59fc (diff)
gpu: nvgpu: Fix gk20a shutdown issue
With CONFIG_PM_GENERIC_DOMAINS_OF enabled, device reboot was getting hung while shutting-down gk20a. It was happening because genpd_dev_pm_detach() was railgating gk20a while other thread was still accessing it. So, assigning NULL to dev->pm_domain->detach for gk20a, so that genpd_dev_pm_detach() is not called during gk20a shutdown, which will not railgate it. This patch will be reverted once we have clean shutdown for gk20a. Bug 200070810 Bug 200099940 Change-Id: Ie2e89ea01a98a9d4f2f68a3ab07b6923ffa374f6 Signed-off-by: Sumit Singh <sumsingh@nvidia.com> Reviewed-on: http://git-master/r/735455 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index 6add8441..b8357c76 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -1210,11 +1210,19 @@ static int gk20a_pm_initialise_domain(struct platform_device *pdev)
1210 struct gk20a_platform *platform = platform_get_drvdata(pdev); 1210 struct gk20a_platform *platform = platform_get_drvdata(pdev);
1211 struct dev_power_governor *pm_domain_gov = NULL; 1211 struct dev_power_governor *pm_domain_gov = NULL;
1212 struct generic_pm_domain *domain = dev_to_genpd(&pdev->dev); 1212 struct generic_pm_domain *domain = dev_to_genpd(&pdev->dev);
1213 struct device *dev = &pdev->dev;
1213 1214
1214#ifdef CONFIG_PM_RUNTIME 1215#ifdef CONFIG_PM_RUNTIME
1215 if (!platform->can_railgate) 1216 if (!platform->can_railgate)
1216 pm_domain_gov = &pm_domain_always_on_gov; 1217 pm_domain_gov = &pm_domain_always_on_gov;
1217#endif 1218#endif
1219 /*
1220 * FIXME: We can remove below assignment once we have clean shutdown
1221 * for gk20a.
1222 */
1223 if (dev->pm_domain)
1224 dev->pm_domain->detach = NULL;
1225
1218 domain->gov = pm_domain_gov; 1226 domain->gov = pm_domain_gov;
1219 1227
1220 if (platform->railgate_delay) 1228 if (platform->railgate_delay)