diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2014-06-09 15:47:31 +0530 |
---|---|---|
committer | Riham Haidar <rhaidar@nvidia.com> | 2014-06-13 11:54:14 -0700 |
commit | ce30a7ffcb175ba088ad4752c9f64642dcd5b5fa (patch) | |
tree | 350987b391a68732c1d4e5bde8844be749dc3b71 /drivers/video | |
parent | c3efa37ecb2c569d26463529027885727f3250ba (diff) |
video: tegra: host: add wmb() before updating PUT
Add write memory barrier wmb() at all places where we update the
dma PUT pointer. We can add this call once we modify PUT and before
we start the cdma.
This is to take care of cache maintenace before
every time we modify PUT pointer and start the cdma.
wmb() ensures that cdma will fetch latest copy of all the buffers
from memory
Change-Id: If01deef7a1c0b4e82de416ee966d9ba51115b34f
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Change-Id: I03bd551220eafa7f3e02476458458de5128c7768
Reviewed-on: http://git-master/r/421524
Reviewed-by: Prajakta Gudadhe <pgudadhe@nvidia.com>
Tested-by: Soumenkumar Dey <sdey@nvidia.com>
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/tegra/host/host1x/host1x_cdma.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/video/tegra/host/host1x/host1x_cdma.c b/drivers/video/tegra/host/host1x/host1x_cdma.c index dcf8afa7bd7b..78fc78cbed5c 100644 --- a/drivers/video/tegra/host/host1x/host1x_cdma.c +++ b/drivers/video/tegra/host/host1x/host1x_cdma.c @@ -238,6 +238,8 @@ static void cdma_start(struct nvhost_cdma *cdma) /* prevent using setclass inside gathers */ nvhost_channel_init_gather_filter(cdma_to_channel(cdma)); + wmb(); + /* start the command DMA */ writel(host1x_channel_dmactrl(false, false, false), chan_regs + host1x_channel_dmactrl_r()); @@ -287,6 +289,8 @@ static void cdma_timeout_restart(struct nvhost_cdma *cdma, u32 getptr) /* reinitialise gather filter for the channel */ nvhost_channel_init_gather_filter(cdma_to_channel(cdma)); + wmb(); + /* start the command DMA */ writel(host1x_channel_dmactrl(false, false, false), chan_regs + host1x_channel_dmactrl_r()); @@ -305,6 +309,7 @@ static void cdma_kick(struct nvhost_cdma *cdma) if (put != cdma->last_put) { void __iomem *chan_regs = cdma_to_channel(cdma)->aperture; + wmb(); writel(put, chan_regs + host1x_channel_dmaput_r()); cdma->last_put = put; } |