summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/host/nvhost_acm.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2012-03-05 09:02:30 +0200
committerSimone Willett <swillett@nvidia.com>2012-04-26 14:33:39 -0700
commitbc888e85389ee98c69e844b9cc14088539f7528b (patch)
tree096d0c313590b89797fa81f58a8d8b5494c4fb19 /drivers/video/tegra/host/nvhost_acm.c
parentc0df55efeec575262e8a739851b0ea364dba69fa (diff)
video: tegra: host: Reset 3D after power on
Sometimes 3D unit comes up with incorrect scissor configuration. Earlier patch added the scissor registers to the context save list, but that did not solve the problem. Remove the extra registers, and reset 3D after powering it up. Bug 939307 Change-Id: Id795f2d99ec3c6b907da2785b1816ce753af7a3f Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/87654 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Graziano Misuraca <gmisuraca@nvidia.com> Tested-by: Graziano Misuraca <gmisuraca@nvidia.com> Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com> Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/host/nvhost_acm.c')
-rw-r--r--drivers/video/tegra/host/nvhost_acm.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/video/tegra/host/nvhost_acm.c b/drivers/video/tegra/host/nvhost_acm.c
index f2a61a9547a0..015b7c4dbf66 100644
--- a/drivers/video/tegra/host/nvhost_acm.c
+++ b/drivers/video/tegra/host/nvhost_acm.c
@@ -55,15 +55,8 @@ static void do_unpowergate_locked(int id)
tegra_unpowergate_partition(id);
}
-void nvhost_module_reset(struct nvhost_device *dev)
+static void do_module_reset_locked(struct nvhost_device *dev)
{
- dev_dbg(&dev->dev,
- "%s: asserting %s module reset (id %d, id2 %d)\n",
- __func__, dev->name,
- dev->powergate_ids[0], dev->powergate_ids[1]);
-
- mutex_lock(&dev->lock);
-
/* assert module and mc client reset */
if (dev->powergate_ids[0] != -1) {
tegra_powergate_mc_disable(dev->powergate_ids[0]);
@@ -89,7 +82,17 @@ void nvhost_module_reset(struct nvhost_device *dev)
tegra_periph_reset_deassert(dev->clk[1]);
tegra_powergate_mc_enable(dev->powergate_ids[1]);
}
+}
+void nvhost_module_reset(struct nvhost_device *dev)
+{
+ dev_dbg(&dev->dev,
+ "%s: asserting %s module reset (id %d, id2 %d)\n",
+ __func__, dev->name,
+ dev->powergate_ids[0], dev->powergate_ids[1]);
+
+ mutex_lock(&dev->lock);
+ do_module_reset_locked(dev);
mutex_unlock(&dev->lock);
dev_dbg(&dev->dev, "%s: module %s out of reset\n",
@@ -108,6 +111,9 @@ static void to_state_clockgated_locked(struct nvhost_device *dev)
&& dev->can_powergate) {
do_unpowergate_locked(dev->powergate_ids[0]);
do_unpowergate_locked(dev->powergate_ids[1]);
+
+ if (dev->powerup_reset)
+ do_module_reset_locked(dev);
}
dev->powerstate = NVHOST_POWER_STATE_CLOCKGATED;
}