summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/host/nvhost_acm.c
diff options
context:
space:
mode:
authorMayuresh Kulkarni <mkulkarni@nvidia.com>2012-06-18 12:35:01 +0530
committerSimone Willett <swillett@nvidia.com>2012-06-25 16:23:31 -0700
commitb8c4bf16077a04daf2c895be7cf8da030e45b60e (patch)
tree74f3cd4af3a41dca67411f1b33d148e293a2d0b2 /drivers/video/tegra/host/nvhost_acm.c
parent5a85dacd8707c7764785b6f38172c67a8c7ef4b0 (diff)
video: tegra: host: add public APIs for power & syncpoint management
- add public APIs for power & sync-point management - all these APIs end with string _ext - all these APIs can be found in linux/nvhost.h - all these APIs take nvhost_device as first argument - all these APIs are based on the fact that host1x hardware driver is parent of all the host1x client driver - this allows clients of host1x which are outside host1x driver code to just include nvhost.h & use host1x driver interfaces - this also hides the implementation details of power & sync-point inside host1x driver code - move sync point ids for dc and nvavp to nvhost.h Bug 961009 Change-Id: I1a9ca074df87656c4d4bd246853e039a7850d56a Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Reviewed-on: http://git-master/r/109219 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/video/tegra/host/nvhost_acm.c')
-rw-r--r--drivers/video/tegra/host/nvhost_acm.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/drivers/video/tegra/host/nvhost_acm.c b/drivers/video/tegra/host/nvhost_acm.c
index 37b81d707639..06005c423a21 100644
--- a/drivers/video/tegra/host/nvhost_acm.c
+++ b/drivers/video/tegra/host/nvhost_acm.c
@@ -31,9 +31,9 @@
#include <mach/clk.h>
#include <mach/hardware.h>
-#define ACM_SUSPEND_WAIT_FOR_IDLE_TIMEOUT (2 * HZ)
-#define POWERGATE_DELAY 10
-#define MAX_DEVID_LENGTH 16
+#define ACM_SUSPEND_WAIT_FOR_IDLE_TIMEOUT (2 * HZ)
+#define POWERGATE_DELAY 10
+#define MAX_DEVID_LENGTH 16
DEFINE_MUTEX(client_list_lock);
@@ -610,3 +610,18 @@ void nvhost_module_deinit(struct nvhost_device *dev)
dev->powerstate = NVHOST_POWER_STATE_DEINIT;
}
+/* public host1x power management APIs */
+bool nvhost_module_powered_ext(struct nvhost_device *dev)
+{
+ return nvhost_module_powered(dev);
+}
+
+void nvhost_module_busy_ext(struct nvhost_device *dev)
+{
+ nvhost_module_busy(dev);
+}
+
+void nvhost_module_idle_ext(struct nvhost_device *dev)
+{
+ nvhost_module_idle(dev);
+}