From 96ffe0c64d88f4f8154322c00823083ef97f3643 Mon Sep 17 00:00:00 2001 From: Sumit Singh Date: Fri, 24 Apr 2015 10:24:23 +0530 Subject: 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 Reviewed-on: http://git-master/r/735455 Reviewed-by: Bharat Nihalani Tested-by: Bharat Nihalani --- drivers/gpu/nvgpu/gk20a/gk20a.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers') 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) struct gk20a_platform *platform = platform_get_drvdata(pdev); struct dev_power_governor *pm_domain_gov = NULL; struct generic_pm_domain *domain = dev_to_genpd(&pdev->dev); + struct device *dev = &pdev->dev; #ifdef CONFIG_PM_RUNTIME if (!platform->can_railgate) pm_domain_gov = &pm_domain_always_on_gov; #endif + /* + * FIXME: We can remove below assignment once we have clean shutdown + * for gk20a. + */ + if (dev->pm_domain) + dev->pm_domain->detach = NULL; + domain->gov = pm_domain_gov; if (platform->railgate_delay) -- cgit v1.2.2