summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/tegra/host/nvhost_cdma.c16
-rw-r--r--drivers/video/tegra/host/nvhost_channel.c3
-rw-r--r--drivers/video/tegra/nvmap/nvmap.c1
3 files changed, 10 insertions, 10 deletions
diff --git a/drivers/video/tegra/host/nvhost_cdma.c b/drivers/video/tegra/host/nvhost_cdma.c
index f27656bac07b..d2a91d117b52 100644
--- a/drivers/video/tegra/host/nvhost_cdma.c
+++ b/drivers/video/tegra/host/nvhost_cdma.c
@@ -522,16 +522,14 @@ void nvhost_cdma_stop(struct nvhost_cdma *cdma)
{
void __iomem *chan_regs = cdma_to_channel(cdma)->aperture;
- if (!cdma->running)
- return;
-
mutex_lock(&cdma->lock);
- wait_cdma(cdma, CDMA_EVENT_SYNC_QUEUE_EMPTY);
+ if (cdma->running) {
+ wait_cdma(cdma, CDMA_EVENT_SYNC_QUEUE_EMPTY);
+ writel(nvhost_channel_dmactrl(true, false, false),
+ chan_regs + HOST1X_CHANNEL_DMACTRL);
+ cdma->running = false;
+ }
mutex_unlock(&cdma->lock);
- writel(nvhost_channel_dmactrl(true, false, false),
- chan_regs + HOST1X_CHANNEL_DMACTRL);
-
- cdma->running = false;
}
/**
@@ -539,9 +537,9 @@ void nvhost_cdma_stop(struct nvhost_cdma *cdma)
*/
void nvhost_cdma_begin(struct nvhost_cdma *cdma)
{
+ mutex_lock(&cdma->lock);
if (!cdma->running)
start_cdma(cdma);
- mutex_lock(&cdma->lock);
cdma->slots_free = 0;
cdma->slots_used = 0;
}
diff --git a/drivers/video/tegra/host/nvhost_channel.c b/drivers/video/tegra/host/nvhost_channel.c
index 70fb173d7f41..7e6848151da4 100644
--- a/drivers/video/tegra/host/nvhost_channel.c
+++ b/drivers/video/tegra/host/nvhost_channel.c
@@ -163,7 +163,8 @@ void nvhost_channel_suspend(struct nvhost_channel *ch)
{
mutex_lock(&ch->reflock);
BUG_ON(nvhost_module_powered(&ch->mod));
- nvhost_cdma_stop(&ch->cdma);
+ if (ch->refcount)
+ nvhost_cdma_stop(&ch->cdma);
mutex_unlock(&ch->reflock);
}
diff --git a/drivers/video/tegra/nvmap/nvmap.c b/drivers/video/tegra/nvmap/nvmap.c
index db4358f1fe55..00b9a5adb49f 100644
--- a/drivers/video/tegra/nvmap/nvmap.c
+++ b/drivers/video/tegra/nvmap/nvmap.c
@@ -377,6 +377,7 @@ static int nvmap_reloc_pin_array(struct nvmap_client *client,
unsigned long kaddr = (unsigned long)addr;
set_pte_at(&init_mm, kaddr, *pte, pfn_pte(pfn, prot));
flush_tlb_kernel_page(kaddr);
+ last_pfn = pfn;
}
reloc_addr = handle_phys(pin) + arr[i].pin_offset;