diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2012-06-15 07:43:07 +0300 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-06-18 18:52:39 -0700 |
commit | 4624dd8bed05435978ae4381cbcfc0382726941c (patch) | |
tree | 776eadb190e03ebddd5e272360338eb40bf7b828 /drivers/video/tegra/host/mpe | |
parent | 9923fdb793c254e9787cdae56cc0c4e4529f3c52 (diff) |
video: tegra: host: Use chip_ops for save context
Call drain fifo and save context functions via nvhost_chip_support.
Earlier client drivers called into host1x code directly, which
makes each client driver SoC specific.
Change-Id: I4f805abad21012e59e11bf6a98fa46441c71c51a
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/109101
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Reviewed-by: Ken Adams <kadams@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/host/mpe')
-rw-r--r-- | drivers/video/tegra/host/mpe/mpe.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/video/tegra/host/mpe/mpe.c b/drivers/video/tegra/host/mpe/mpe.c index 9f9055311b35..7b76393de6c6 100644 --- a/drivers/video/tegra/host/mpe/mpe.c +++ b/drivers/video/tegra/host/mpe/mpe.c @@ -396,7 +396,7 @@ static u32 *save_regs(u32 *ptr, unsigned int *pending, u32 count = regs->count; ++ptr; /* restore incr */ if (regs->type == HWCTX_REGINFO_NORMAL) { - host1x_drain_read_fifo(channel->aperture, + nvhost_channel_drain_read_fifo(channel, ptr, count, pending); ptr += count; } else { @@ -405,8 +405,8 @@ static u32 *save_regs(u32 *ptr, unsigned int *pending, BUG_ON(msi->out_pos >= NR_WRITEBACKS); word = msi->out[msi->out_pos++]; } else { - host1x_drain_read_fifo(channel->aperture, - &word, 1, pending); + nvhost_channel_drain_read_fifo(channel, + &word, 1, pending); if (regs->type == HWCTX_REGINFO_STASH) { BUG_ON(msi->in_pos >= NR_STASHES); msi->in[msi->in_pos++] = word; @@ -426,7 +426,7 @@ static u32 *save_ram(u32 *ptr, unsigned int *pending, { int err = 0; ptr += RESTORE_RAM_SIZE; - err = host1x_drain_read_fifo(channel->aperture, ptr, words, pending); + err = nvhost_channel_drain_read_fifo(channel, ptr, words, pending); WARN_ON(err); return ptr + words; } @@ -583,13 +583,7 @@ struct nvhost_hwctx_handler *nvhost_mpe_ctxhandler_init(u32 syncpt, int nvhost_mpe_prepare_power_off(struct nvhost_device *dev) { - struct nvhost_hwctx *cur_ctx = dev->channel->cur_ctx; - int err = 0; - if (cur_ctx) - err = host1x_save_context(dev, - to_host1x_hwctx_handler(cur_ctx->h)->syncpt); - - return err; + return nvhost_channel_save_context(dev->channel); } enum mpe_ip_ver { |