From: tixy@linaro.org (Jon Medhurst)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] dma: pl330: Limit MFIFO usage for memcpy to avoid exhausting entries
Date: Fri, 7 Nov 2014 18:05:18 +0000 [thread overview]
Message-ID: <1415383518-29327-3-git-send-email-tixy@linaro.org> (raw)
In-Reply-To: <1415383518-29327-1-git-send-email-tixy@linaro.org>
The MFIFO is shared by all channels so restrict each memcpy to it's fair
share. This is being over cautious, but without a global view of DMA
channel usage on a system it's not possible to come up with a more
optimum safe limit.
Signed-off-by: Jon Medhurst <tixy@linaro.org>
---
drivers/dma/pl330.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 8f869ec..849439a 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -2336,7 +2336,7 @@ static inline int get_burst_len(struct dma_pl330_desc *desc, size_t len)
int burst_len;
burst_len = pl330->pcfg.data_bus_width / 8;
- burst_len *= pl330->pcfg.data_buf_dep;
+ burst_len *= pl330->pcfg.data_buf_dep / pl330->pcfg.num_chan;
burst_len >>= desc->rqcfg.brst_size;
/* src/dst_burst_len can't be more than 16 */
--
2.1.1
next prev parent reply other threads:[~2014-11-07 18:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-07 18:05 [PATCH 0/2] dma: pl330: Fixes for DMA memcpy Jon Medhurst
2014-11-07 18:05 ` [PATCH 1/2] dma: pl330: Align DMA memcpy operations to MFIFO width Jon Medhurst
2014-11-07 18:05 ` Jon Medhurst [this message]
2014-11-12 9:31 ` [PATCH 0/2] dma: pl330: Fixes for DMA memcpy Vinod Koul
2014-11-13 10:19 ` Jon Medhurst (Tixy)
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=1415383518-29327-3-git-send-email-tixy@linaro.org \
--to=tixy@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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).