Merge branch android-tegra-2.6.36 into android-tegra-moto-2.6.36

Change-Id: Icb97546afa6da84601ce59c1ad00998196b43df6
This commit is contained in:
Erik Gilling 2011-02-14 18:07:58 -08:00
commit ef80a0a5ff
2 changed files with 9 additions and 10 deletions

View File

@ -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;
}

View File

@ -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);
}