diff options
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 | ||