summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMayuresh Kulkarni <mkulkarni@nvidia.com>2012-03-05 18:36:47 +0530
committerSimone Willett <swillett@nvidia.com>2012-03-06 18:16:13 -0800
commit8311718a6b9375730ee2f1c036005ab1923059cd (patch)
treee8ab099e4edde55cd1151a5a429a0be21cac154a /drivers
parente2b7ea5f961f096b5a2a2791e80835742649552d (diff)
video: tegra: host: register nvhost master device in board-xxx-panel.c
- the suspend order of devices is governed by the order in which devices are registered - this commit ensures that nvhost master is registered before any of the graphics devices - previously this was done in rootfs_init call which is later than arch_init calls of board-xxx-panel.c - this caused tegra-dc device to be registered *before* nvhost master device. as a result it was suspended *later* than nvhost master device. this is a clear violation of dependency rule for nvhost. this caused suspend-resume to fail for L4T - this worked on android as it has CONFIG early suspend enabled while it failed for L4T which doesn't have CONFIG early suspend enabled Bug 947617 Change-Id: I6cd405f3ba23d004e7659140019f5130e6c25159 Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Reviewed-on: http://git-master/r/87756 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/tegra/host/dev.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/video/tegra/host/dev.c b/drivers/video/tegra/host/dev.c
index fa8c6176fcbc..b2575860e91b 100644
--- a/drivers/video/tegra/host/dev.c
+++ b/drivers/video/tegra/host/dev.c
@@ -1072,7 +1072,8 @@ static int __exit nvhost_remove(struct nvhost_device *dev)
static int nvhost_suspend(struct nvhost_device *dev, pm_message_t state)
{
struct nvhost_master *host = nvhost_get_drvdata(dev);
- int i, ret;
+ int i, ret = 0;
+
dev_info(&dev->dev, "suspending\n");
for (i = 0; i < host->nb_channels; i++) {
@@ -1083,6 +1084,7 @@ static int nvhost_suspend(struct nvhost_device *dev, pm_message_t state)
ret = nvhost_module_suspend(host->dev, true);
dev_info(&dev->dev, "suspend status: %d\n", ret);
+
return ret;
}
@@ -1105,14 +1107,7 @@ static struct nvhost_driver nvhost_driver = {
static int __init nvhost_mod_init(void)
{
- int err;
-
register_sets = tegra_gpu_register_sets();
-
- err = nvhost_device_register(&tegra_grhost_device);
- if (err)
- return err;
-
return nvhost_driver_register(&nvhost_driver);
}