summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMayuresh Kulkarni <mkulkarni@nvidia.com>2012-02-03 15:06:07 +0530
committerSimone Willett <swillett@nvidia.com>2012-02-13 09:27:15 -0800
commit410041d0247db2434a3013f16930d2fcd16256c8 (patch)
treebf70ce748d00dad01f80f199a1d82b5f31a0ba26 /include/linux
parente8dc4bd80bf2a31b46bf2bad034dcd514c1e11f5 (diff)
video: tegra: host: use runtime pm for clock management
- use runtime pm for clock management of host1x and its clients thus replacing ACM - start a delayed worker after disabling the clock if module supports power gating - in its timeout handler power gate the module after saving its context for next submit - use auto-suspend mode of runtime pm for clock management - pm core seems to keep a ref count on runtime pm thus we cannot use runtime pm's usage_count as an idicator of module idle during suspend - do not use runtime pm call-backs during system suspend. instead manage the clocks directly for context save of modules that support it - enable runtime pm only during boot-up as pm core disables it before suspending the device and enables it after resume for bug 887332 Change-Id: I3b30643e8e75c13684cf4edaaae4429c3a18d6eb Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Reviewed-on: http://git-master/r/79186 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nvhost.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/include/linux/nvhost.h b/include/linux/nvhost.h
index 55b75d048791..9002620a834a 100644
--- a/include/linux/nvhost.h
+++ b/include/linux/nvhost.h
@@ -38,13 +38,6 @@ struct nvhost_clock {
long default_rate;
};
-enum nvhost_device_powerstate_t {
- NVHOST_POWER_STATE_DEINIT,
- NVHOST_POWER_STATE_RUNNING,
- NVHOST_POWER_STATE_CLOCKGATED,
- NVHOST_POWER_STATE_POWERGATED
-};
-
struct nvhost_device {
const char *name; /* Device name */
struct device dev; /* Linux device struct */
@@ -74,8 +67,7 @@ struct nvhost_device {
int num_clks; /* Number of clocks opened for dev */
struct clk *clk[NVHOST_MODULE_MAX_CLOCKS];
struct mutex lock; /* Power management lock */
- int powerstate; /* Current power state */
- int refcount; /* Number of tasks active */
+ bool powered; /* Current power state */
wait_queue_head_t idle_wq; /* Work queue for idle */
struct list_head client_list; /* List of clients and rate requests */