summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/host/nvhost_acm.c
diff options
context:
space:
mode:
authorMayuresh Kulkarni <mkulkarni@nvidia.com>2012-03-27 17:46:07 +0530
committerSimone Willett <swillett@nvidia.com>2012-04-03 17:51:57 -0700
commit0081e1a9946ad6d98feabfab4fcba8e657248606 (patch)
tree3ed052251d67037d23fd5aee5b5201d16a21c41d /drivers/video/tegra/host/nvhost_acm.c
parent938f317d012e2ce25f86c046c620f269aec1410a (diff)
video: tegra: host: api clean-up
- remove redundant 2nd argument to nvhost_module_suspend() - also remove the debug_not_idle() as it redundant after refactor of host1x code - debug_not_idle() iterates through host1x's private instance of channels to find out which client module is active (along with host1x itself). we are going to remove these instances of channels from host1x's device private data - reduce the prints during suspend Bug 871237 Change-Id: I66c7c4d8f35c157b1626784a6a27166442a50557 Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Reviewed-on: http://git-master/r/92550 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/host/nvhost_acm.c')
-rw-r--r--drivers/video/tegra/host/nvhost_acm.c39
1 files changed, 2 insertions, 37 deletions
diff --git a/drivers/video/tegra/host/nvhost_acm.c b/drivers/video/tegra/host/nvhost_acm.c
index 318f209651ac..f2a61a9547a0 100644
--- a/drivers/video/tegra/host/nvhost_acm.c
+++ b/drivers/video/tegra/host/nvhost_acm.c
@@ -394,41 +394,9 @@ static int is_module_idle(struct nvhost_device *dev)
return (count == 0);
}
-static void debug_not_idle(struct nvhost_master *host)
-{
- int i;
- bool lock_released = true;
-
- for (i = 0; i < host->nb_channels; i++) {
- struct nvhost_device *dev = host->channels[i].dev;
- mutex_lock(&dev->lock);
- if (dev->name)
- dev_warn(&host->dev->dev,
- "tegra_grhost: %s: refcnt %d\n", dev->name,
- dev->refcount);
- mutex_unlock(&dev->lock);
- }
-
- for (i = 0; i < host->syncpt.nb_mlocks; i++) {
- int c = atomic_read(&host->syncpt.lock_counts[i]);
- if (c) {
- dev_warn(&host->dev->dev,
- "tegra_grhost: lock id %d: refcnt %d\n",
- i, c);
- lock_released = false;
- }
- }
- if (lock_released)
- dev_dbg(&host->dev->dev, "tegra_grhost: all locks released\n");
-}
-
-int nvhost_module_suspend(struct nvhost_device *dev, bool system_suspend)
+int nvhost_module_suspend(struct nvhost_device *dev)
{
int ret;
- struct nvhost_master *host = nvhost_get_host(dev);
-
- if (system_suspend && !is_module_idle(dev))
- debug_not_idle(host);
ret = wait_event_timeout(dev->idle_wq, is_module_idle(dev),
ACM_SUSPEND_WAIT_FOR_IDLE_TIMEOUT);
@@ -438,9 +406,6 @@ int nvhost_module_suspend(struct nvhost_device *dev, bool system_suspend)
return -EBUSY;
}
- if (system_suspend)
- dev_dbg(&dev->dev, "tegra_grhost: entered idle\n");
-
mutex_lock(&dev->lock);
cancel_delayed_work(&dev->powerstate_down);
to_state_powergated_locked(dev);
@@ -459,7 +424,7 @@ void nvhost_module_deinit(struct nvhost_device *dev)
if (dev->deinit)
dev->deinit(dev);
- nvhost_module_suspend(dev, false);
+ nvhost_module_suspend(dev);
for (i = 0; i < dev->num_clks; i++)
clk_put(dev->clk[i]);
dev->powerstate = NVHOST_POWER_STATE_DEINIT;