[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52087921.8040101@ti.com>
Date: Mon, 12 Aug 2013 11:26:49 +0530
From: Sekhar Nori <nsekhar@...com>
To: Joel Fernandes <joelf@...com>
CC: Tony Lindgren <tony@...mide.com>,
Santosh Shilimkar <santosh.shilimkar@...com>,
Sricharan R <r.sricharan@...com>,
Rajendra Nayak <rnayak@...com>,
Lokesh Vutla <lokeshvutla@...com>,
Matt Porter <matt@...orter.com>,
Grant Likely <grant.likely@...retlab.ca>,
Rob Herring <rob.herring@...xeda.com>,
Vinod Koul <vinod.koul@...el.com>, Dan Williams <djbw@...com>,
Mark Brown <broonie@...aro.org>,
Benoit Cousson <benoit.cousson@...aro.org>,
Russell King <linux@....linux.org.uk>,
Arnd Bergmann <arnd@...db.de>, Olof Johansson <olof@...om.net>,
Balaji TK <balajitk@...com>,
Gururaja Hebbar <gururaja.hebbar@...com>,
Chris Ball <cjb@...top.org>,
Jason Kridner <jkridner@...gleboard.org>,
Linux OMAP List <linux-omap@...r.kernel.org>,
Linux ARM Kernel List <linux-arm-kernel@...ts.infradead.org>,
Linux DaVinci Kernel List
<davinci-linux-open-source@...ux.davincidsp.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux MMC List <linux-mmc@...r.kernel.org>
Subject: Re: [PATCH v3 08/12] dma: edma: Add one more required slot to MAX
slots
On Monday 05 August 2013 09:44 PM, Joel Fernandes wrote:
> We'd now need a separate slot just for the channel and separate
> ones for the 2 linked sets, so we make adjustments to allocate
> an extra channel accordingly.
>
> Signed-off-by: Joel Fernandes <joelf@...com>
No need for a separate patch for this, just do this in the patch where
you include the two linked sets.
> ---
> drivers/dma/edma.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
> index a242269..df50a04 100644
> --- a/drivers/dma/edma.c
> +++ b/drivers/dma/edma.c
> @@ -48,7 +48,7 @@
>
> /* Max of 16 segments per channel to conserve PaRAM slots */
> #define MAX_NR_SG 16
> -#define EDMA_MAX_SLOTS MAX_NR_SG
> +#define EDMA_MAX_SLOTS (MAX_NR_SG+1)
> #define EDMA_DESCRIPTORS 16
>
> struct edma_desc {
> @@ -311,6 +311,9 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg(
>
> num_slots_needed = sg_len > MAX_NR_SG ? MAX_NR_SG : sg_len;
>
> + /* Allocate one extra to account for the channel itself */
> + num_slots_needed++;
You can do:
nslots = min(MAX_NR_SG, sg_len) + 1;
Thanks,
Sekhar
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists