diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2014-08-06 03:41:07 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:10:47 -0400 |
commit | 7f991657c102e819e90faedf74b081cc246c892e (patch) | |
tree | f0943c1ebfa3fb946671753a73d11a26027c4f0b /drivers/gpu | |
parent | 2489960344b02fb8ca8f725a481ead527bb0da49 (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
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 15 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 3 |
2 files changed, 13 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 4e3beb7c..9e9a94a0 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -986,6 +986,14 @@ static int gk20a_pm_finalize_poweron(struct device *dev) | |||
986 | 986 | ||
987 | if (IS_ENABLED(CONFIG_GK20A_CDE)) | 987 | if (IS_ENABLED(CONFIG_GK20A_CDE)) |
988 | gk20a_init_cde_support(g); | 988 | gk20a_init_cde_support(g); |
989 | |||
990 | #ifdef CONFIG_INPUT_CFBOOST | ||
991 | if (!g->boost_added) { | ||
992 | gk20a_dbg_info("add touch boost"); | ||
993 | cfb_add_device(dev); | ||
994 | g->boost_added = true; | ||
995 | } | ||
996 | #endif | ||
989 | done: | 997 | done: |
990 | return err; | 998 | return err; |
991 | } | 999 | } |
@@ -1526,10 +1534,6 @@ static int gk20a_probe(struct platform_device *dev) | |||
1526 | gk20a_cde_debugfs_init(dev); | 1534 | gk20a_cde_debugfs_init(dev); |
1527 | #endif | 1535 | #endif |
1528 | 1536 | ||
1529 | #ifdef CONFIG_INPUT_CFBOOST | ||
1530 | cfb_add_device(&dev->dev); | ||
1531 | #endif | ||
1532 | |||
1533 | gk20a_init_gr(gk20a); | 1537 | gk20a_init_gr(gk20a); |
1534 | 1538 | ||
1535 | return 0; | 1539 | return 0; |
@@ -1541,7 +1545,8 @@ static int __exit gk20a_remove(struct platform_device *dev) | |||
1541 | gk20a_dbg_fn(""); | 1545 | gk20a_dbg_fn(""); |
1542 | 1546 | ||
1543 | #ifdef CONFIG_INPUT_CFBOOST | 1547 | #ifdef CONFIG_INPUT_CFBOOST |
1544 | cfb_remove_device(&dev->dev); | 1548 | if (g->boost_added) |
1549 | cfb_remove_device(&dev->dev); | ||
1545 | #endif | 1550 | #endif |
1546 | 1551 | ||
1547 | if (g->remove_support) | 1552 | if (g->remove_support) |
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index a03d5765..a82ad254 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -259,6 +259,9 @@ struct gk20a { | |||
259 | void __iomem *bar1_saved; | 259 | void __iomem *bar1_saved; |
260 | 260 | ||
261 | bool power_on; | 261 | bool power_on; |
262 | #ifdef CONFIG_INPUT_CFBOOST | ||
263 | bool boost_added; | ||
264 | #endif | ||
262 | 265 | ||
263 | struct rw_semaphore busy_lock; | 266 | struct rw_semaphore busy_lock; |
264 | 267 | ||