summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2014-08-06 10:41:07 +0300
committerWinnie Hsu <whsu@nvidia.com>2015-01-06 18:30:48 -0800
commit57d7c4ae3e86c2710eaad6f9812b982332ded940 (patch)
tree020b759dd5de3391eedfbfb5783d42c79acde7c8
parent9dfa869a6f91fc29b61a55fbf071d2f82c40f5dd (diff)
gpu: nvgpu: Add boost once GPU is initialized
Workaround for GPU hang if boost turns GPU on before it is initialized. Bug 1435870 Change-Id: I07d0617049612344ca7c494da8cb8d75789984e5 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/453375 (cherry picked from commit 260cf3d3fab941126eebf4bc977cb408587492eb) Reviewed-on: http://git-master/r/655951 Tested-by: Rajkumar Kasirajan <rkasirajan@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: Winnie Hsu <whsu@nvidia.com>
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c14
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h3
2 files changed, 12 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index bf882f294963..fdfc9260da99 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -919,6 +919,13 @@ static int gk20a_pm_finalize_poweron(struct device *dev)
gk20a_scale_resume(pdev);
+#ifdef CONFIG_INPUT_CFBOOST
+ if (!g->boost_added) {
+ gk20a_dbg_info("add touch boost");
+ cfb_add_device(dev);
+ g->boost_added = true;
+ }
+#endif
done:
return err;
}
@@ -1463,10 +1470,6 @@ static int gk20a_probe(struct platform_device *dev)
gk20a_pmu_debugfs_init(dev);
#endif
-#ifdef CONFIG_INPUT_CFBOOST
- cfb_add_device(&dev->dev);
-#endif
-
gk20a_init_gr(gk20a);
return 0;
@@ -1478,7 +1481,8 @@ static int __exit gk20a_remove(struct platform_device *dev)
gk20a_dbg_fn("");
#ifdef CONFIG_INPUT_CFBOOST
- cfb_remove_device(&dev->dev);
+ if (g->boost_added)
+ cfb_remove_device(&dev->dev);
#endif
if (g->remove_support)
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index ae4900722855..d8f902b28a42 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -214,6 +214,9 @@ struct gk20a {
void __iomem *bar1;
bool power_on;
+#ifdef CONFIG_INPUT_CFBOOST
+ bool boost_added;
+#endif
struct rw_semaphore busy_lock;