From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: "Mark A. Greer" <mgreer@animalcreek.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC] dmaengine: omap-dma: Allow DMA controller to prefetch data
Date: Mon, 19 Nov 2012 11:01:44 +0100 [thread overview]
Message-ID: <50AA0388.4020803@ti.com> (raw)
In-Reply-To: <20121018222046.GA28541@animalcreek.com>
Hi,
On 10/19/2012 12:20 AM, Mark A. Greer wrote:
> Enable DMA prefetching by setting the 'OMAP_DMA_DST_SYNC_PREFETCH'
> flag whenever there is a destination synchronized DMA transfer.
> Prefetching is not allowed on source synchronized DMA transfers.
>
> Enabling prefetch significantly improves DMA performance.
> For example, running 'modprobe tcrypt sec=2 mode=403' which
> exercises the omap-sham driver on an am37x EVM yeilds the
> following results:
> drivers/dma/omap-dma.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c
> index bb2d8e7..aadddb2 100644
> --- a/drivers/dma/omap-dma.c
> +++ b/drivers/dma/omap-dma.c
> @@ -310,7 +310,7 @@ static struct dma_async_tx_descriptor *omap_dma_prep_slave_sg(
> dev_addr = c->cfg.dst_addr;
> dev_width = c->cfg.dst_addr_width;
> burst = c->cfg.dst_maxburst;
> - sync_type = OMAP_DMA_DST_SYNC;
> + sync_type = OMAP_DMA_DST_SYNC | OMAP_DMA_DST_SYNC_PREFETCH;
This should be:
- sync_type = OMAP_DMA_DST_SYNC;
+ sync_type = OMAP_DMA_DST_SYNC_PREFETCH;
> } else {
> dev_err(chan->device->dev, "%s: bad direction?\n", __func__);
> return NULL;
> @@ -387,7 +387,7 @@ static struct dma_async_tx_descriptor *omap_dma_prep_dma_cyclic(
> dev_addr = c->cfg.dst_addr;
> dev_width = c->cfg.dst_addr_width;
> burst = c->cfg.dst_maxburst;
> - sync_type = OMAP_DMA_DST_SYNC;
> + sync_type = OMAP_DMA_DST_SYNC | OMAP_DMA_DST_SYNC_PREFETCH;
We should not enable the prefetch for cyclic right now. We will investigate it
more.
> } else {
> dev_err(chan->device->dev, "%s: bad direction?\n", __func__);
> return NULL;
>
--
Péter
next prev parent reply other threads:[~2012-11-19 10:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-18 22:20 [RFC] dmaengine: omap-dma: Allow DMA controller to prefetch data Mark A. Greer
2012-10-18 22:46 ` Mark A. Greer
2012-10-18 22:55 ` Russell King - ARM Linux
2012-10-18 23:24 ` Mark A. Greer
2012-10-18 23:33 ` Russell King - ARM Linux
2012-10-18 23:50 ` Mark A. Greer
2012-10-19 12:45 ` Péter Ujfalusi
2012-11-05 22:06 ` Mark A. Greer
2012-11-16 22:39 ` Mark A. Greer
2012-11-17 11:31 ` Russell King - ARM Linux
2012-11-19 10:00 ` Peter Ujfalusi
2012-11-19 12:16 ` Russell King - ARM Linux
2012-11-19 10:01 ` Peter Ujfalusi [this message]
2012-11-19 16:19 ` Mark A. Greer
2012-11-19 16:49 ` Mark A. Greer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50AA0388.4020803@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=mgreer@animalcreek.com \
--cc=rmk+kernel@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).