diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2011-12-29 16:03:51 +0200 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-01-12 09:56:22 -0800 |
commit | 10c8828c7b2bf26ab6ec9feee860fc5cc8eb2ce7 (patch) | |
tree | 6e1c0b97ddd63f64eee95c313f46fb49940edc25 /drivers/video/tegra/host/mpe | |
parent | 6bc2684e40093d8859b90d96c0d9957e1472c5c9 (diff) |
video: tegra: host: Move device data to nvhost_device
Move all device data from nvhost_channeldesc, nvhost_moduledesc and
nvhost_module to nvhost_device. nvhost_devices are also assigned into
a hierarchy to prepare for implementation of runtime power management.
Change-Id: I1e18daae8fe538086cd1f453d316e0f73e9d7d92
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/72844
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Reviewed-on: http://git-master/r/74560
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/host/mpe')
-rw-r--r-- | drivers/video/tegra/host/mpe/mpe.c | 12 | ||||
-rw-r--r-- | drivers/video/tegra/host/mpe/mpe.h | 3 |
2 files changed, 8 insertions, 7 deletions
diff --git a/drivers/video/tegra/host/mpe/mpe.c b/drivers/video/tegra/host/mpe/mpe.c index 3e89e6989e44..5d497221a671 100644 --- a/drivers/video/tegra/host/mpe/mpe.c +++ b/drivers/video/tegra/host/mpe/mpe.c @@ -439,7 +439,7 @@ static u32 *save_ram(u32 *ptr, unsigned int *pending, static struct nvhost_hwctx *ctxmpe_alloc(struct nvhost_channel *ch) { - struct nvmap_client *nvmap = ch->dev->nvmap; + struct nvmap_client *nvmap = ch->dev->host->nvmap; struct nvhost_hwctx *ctx; ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); @@ -482,7 +482,7 @@ static void ctxmpe_get(struct nvhost_hwctx *ctx) static void ctxmpe_free(struct kref *ref) { struct nvhost_hwctx *ctx = container_of(ref, struct nvhost_hwctx, ref); - struct nvmap_client *nvmap = ctx->channel->dev->nvmap; + struct nvmap_client *nvmap = ctx->channel->dev->host->nvmap; if (ctx->restore_virt) nvmap_munmap(ctx->restore, ctx->restore_virt); @@ -522,7 +522,7 @@ static void ctxmpe_save_service(struct nvhost_hwctx *ctx) IRFR_RAM_SIZE, IRFR_RAM_READ_CMD, IRFR_RAM_READ_DATA); wmb(); - nvhost_syncpt_cpu_incr(&ctx->channel->dev->syncpt, NVSYNCPT_MPE); + nvhost_syncpt_cpu_incr(&ctx->channel->dev->host->syncpt, NVSYNCPT_MPE); } int __init nvhost_mpe_ctxhandler_init(struct nvhost_hwctx_handler *h) @@ -532,7 +532,7 @@ int __init nvhost_mpe_ctxhandler_init(struct nvhost_hwctx_handler *h) u32 *save_ptr; ch = container_of(h, struct nvhost_channel, ctxhandler); - nvmap = ch->dev->nvmap; + nvmap = ch->dev->host->nvmap; setup_save(NULL); @@ -564,7 +564,7 @@ int __init nvhost_mpe_ctxhandler_init(struct nvhost_hwctx_handler *h) return 0; } -int nvhost_mpe_prepare_power_off(struct nvhost_module *mod) +int nvhost_mpe_prepare_power_off(struct nvhost_device *dev) { - return host1x_save_context(mod, NVSYNCPT_MPE); + return host1x_save_context(dev, NVSYNCPT_MPE); } diff --git a/drivers/video/tegra/host/mpe/mpe.h b/drivers/video/tegra/host/mpe/mpe.h index dfc7259f1c67..63f761b429d5 100644 --- a/drivers/video/tegra/host/mpe/mpe.h +++ b/drivers/video/tegra/host/mpe/mpe.h @@ -24,8 +24,9 @@ #define __NVHOST_MPE_MPE_H struct nvhost_hwctx_handler; +struct nvhost_device; int nvhost_mpe_ctxhandler_init(struct nvhost_hwctx_handler *h); -int nvhost_mpe_prepare_power_off(struct nvhost_module *mod); +int nvhost_mpe_prepare_power_off(struct nvhost_device *dev); #endif |