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
This commit is contained in:
Terje Bergstrom
2014-08-06 10:41:07 +03:00
committed by Dan Willemsen
parent 2489960344
commit 7f991657c1
2 changed files with 13 additions and 5 deletions

View File

@@ -986,6 +986,14 @@ static int gk20a_pm_finalize_poweron(struct device *dev)
if (IS_ENABLED(CONFIG_GK20A_CDE))
gk20a_init_cde_support(g);
#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;
}
@@ -1526,10 +1534,6 @@ static int gk20a_probe(struct platform_device *dev)
gk20a_cde_debugfs_init(dev);
#endif
#ifdef CONFIG_INPUT_CFBOOST
cfb_add_device(&dev->dev);
#endif
gk20a_init_gr(gk20a);
return 0;
@@ -1541,7 +1545,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)

View File

@@ -259,6 +259,9 @@ struct gk20a {
void __iomem *bar1_saved;
bool power_on;
#ifdef CONFIG_INPUT_CFBOOST
bool boost_added;
#endif
struct rw_semaphore busy_lock;