From: Joel Fernandes <joelf@ti.com>
To: Matt Porter <matt@ohporter.com>,
Vinod Koul <vinod.koul@intel.com>,
Mark Brown <broonie@linaro.org>,
Russell King <linux@arm.linux.org.uk>, Dan Williams <djbw@fb.com>,
Jyri Sarha <jsarha@ti.com>, Lars Peter-Clausen <lars@metafoo.de>
Cc: Linux OMAP List <linux-omap@vger.kernel.org>,
Linux ARM Kernel List <linux-arm-kernel@lists.infradead.org>,
Linux DaVinci Kernel List
<davinci-linux-open-source@linux.davincidsp.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
<alsa-devel@alsa-project.org>, Joel Fernandes <joelf@ti.com>
Subject: [PATCH 3/3] dma: edma: Increase maximum SG limit to 20
Date: Mon, 23 Sep 2013 18:05:15 -0500 [thread overview]
Message-ID: <1379977515-3794-4-git-send-email-joelf@ti.com> (raw)
In-Reply-To: <1379977515-3794-1-git-send-email-joelf@ti.com>
davinci-pcm uses 16 as the no.of periods. With this, in EDMA we have to
allocate atleast 17 slots: 1 slot for channel, and 16 slots the periods.
Due to this, the MAX_NR_SG limitation causes problems, set it to 20 to make
cyclic DMA work when davinci-pcm is converted to use DMA Engine. Also add
a comment clarifying this.
Signed-off-by: Joel Fernandes <joelf@ti.com>
---
drivers/dma/edma.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index 9b63e1e..407b496 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -46,8 +46,14 @@
#define EDMA_CHANS 64
#endif /* CONFIG_ARCH_DAVINCI_DA8XX */
-/* Max of 16 segments per channel to conserve PaRAM slots */
-#define MAX_NR_SG 16
+/*
+ * Max of 20 segments per channel to conserve PaRAM slots
+ * Also note that MAX_NR_SG should be atleast the no.of periods
+ * that are required for ASoC, otherwise DMA prep calls will
+ * fail. Today davinci-pcm is the only user of this driver and
+ * requires atleast 17 slots, so we setup the default to 20.
+ */
+#define MAX_NR_SG 20
#define EDMA_MAX_SLOTS MAX_NR_SG
#define EDMA_DESCRIPTORS 16
--
1.8.1.2
next prev parent reply other threads:[~2013-09-23 23:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-23 23:05 [PATCH 0/3] dma: edma: Add cyclic DMA support Joel Fernandes
2013-09-23 23:05 ` [PATCH 1/3] dma: edma: Split out PaRAM set calculations into its own function Joel Fernandes
2013-10-21 7:26 ` Vinod Koul
2013-09-23 23:05 ` [PATCH 2/3] dma: edma: Add support for Cyclic DMA Joel Fernandes
2013-10-21 6:53 ` Vinod Koul
2013-10-22 15:30 ` Joel Fernandes
2013-10-24 16:38 ` Vinod Koul
2013-10-24 17:57 ` Joel Fernandes
2013-10-31 14:10 ` Vinod Koul
2013-10-31 16:03 ` Joel Fernandes
2013-09-23 23:05 ` Joel Fernandes [this message]
2013-10-21 7:26 ` [PATCH 3/3] dma: edma: Increase maximum SG limit to 20 Vinod Koul
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=1379977515-3794-4-git-send-email-joelf@ti.com \
--to=joelf@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@linaro.org \
--cc=davinci-linux-open-source@linux.davincidsp.com \
--cc=djbw@fb.com \
--cc=jsarha@ti.com \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=matt@ohporter.com \
--cc=vinod.koul@intel.com \
/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