summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.h
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2016-06-09 09:16:21 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-07-08 03:58:53 -0400
commite27c72446bf09196d6d66f28389f00565273a13f (patch)
tree473530a0f10eee8d9dcae29afdc35c72b7a6a0ad /drivers/gpu/nvgpu/gk20a/gk20a.h
parent8417698b519be9dc8c1bd04714fc72ce4e0bc38f (diff)
gpu: nvgpu: simplify power management
We currenlty initialize both runtime PM and pm_domains frameworks and use pm_domain to control runtime power management of NvGPU But since GPU has a separate rail, using pm_domain is not strictly required Hence remove pm_domain support and use runtime PM only for all the power management This also simplifies the code a lot Initialization in gk20a_pm_init() - if railgate_delay is set, set autosuspend delay of runtime PM - try enabling runtime PM - if runtime PM is now enabled, keep GPU railgated - if runtime PM is not enabled, keep GPU unrailgated - if can_railgate = false, disable runtime PM and keep GPU unrailgated Set gk20a_pm_ops with below callbacks for runtime PM static const struct dev_pm_ops gk20a_pm_ops = { .runtime_resume = gk20a_pm_runtime_resume, .runtime_suspend = gk20a_pm_runtime_suspend, .resume = gk20a_pm_resume, .suspend = gk20a_pm_suspend, } Move gk20a_busy() to use runtime checks of pm_runtime_enabled() instead of using compile time checks on CONFIG_PM Clean up some pm_domain related code Remove use of gk20a_pm_enable/disable_clk() since this should be already done in platform specific unrailgate()/ railgate() APIs Fix "railgate_delay" and "railgate_enable" sysfs to use runtime PM calls For VGPU, disable runtime PM during vgpu_pm_init() With this, we will initialize vgpu with vgpu_pm_finalize_poweron() upon first call to gk20a_busy() Jira DNVGPU-57 Change-Id: I6013e33ae9bd28f35c25271af1239942a4fa0919 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1163216 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index b8a2fc3e..949cd4a5 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -664,6 +664,7 @@ struct gk20a {
664 struct device *dev; 664 struct device *dev;
665 struct platform_device *host1x_dev; 665 struct platform_device *host1x_dev;
666 666
667
667 struct resource *reg_mem; 668 struct resource *reg_mem;
668 void __iomem *regs; 669 void __iomem *regs;
669 void __iomem *regs_saved; 670 void __iomem *regs_saved;
@@ -673,6 +674,7 @@ struct gk20a {
673 void __iomem *bar1_saved; 674 void __iomem *bar1_saved;
674 675
675 bool power_on; 676 bool power_on;
677 bool suspended;
676 678
677 struct rw_semaphore busy_lock; 679 struct rw_semaphore busy_lock;
678 680
@@ -882,11 +884,6 @@ struct gk20a_cyclestate_buffer_elem {
882 u64 data; 884 u64 data;
883}; 885};
884 886
885struct gk20a_domain_data {
886 struct generic_pm_domain gpd;
887 struct gk20a *gk20a;
888};
889
890/* debug accessories */ 887/* debug accessories */
891 888
892#ifdef CONFIG_DEBUG_FS 889#ifdef CONFIG_DEBUG_FS