Message ID | 1375719297-12871-9-git-send-email-joelf@ti.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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@ti.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-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Aug 12, 2013 at 11:26:49AM +0530, Sekhar Nori wrote: > No need for a separate patch for this, just do this in the patch where > you include the two linked sets. Can you guys please think about the CC lists you're using for these patch serieses? I've certainly no interest in random patches to the DaVinci DMA controllers, and I suspect the same is true for most of the people on the CC list.
On 08/12/2013 08:31 AM, Mark Brown wrote: > On Mon, Aug 12, 2013 at 11:26:49AM +0530, Sekhar Nori wrote: > >> No need for a separate patch for this, just do this in the patch where >> you include the two linked sets. > > Can you guys please think about the CC lists you're using for these > patch serieses? I've certainly no interest in random patches to the > DaVinci DMA controllers, and I suspect the same is true for most of the > people on the CC list. > Sorry. I was actually getting a sense of this. What I did initially was I copied the CC list from last years work on the same series hoping that it would be a complete mail chain. Bad judgement on my part. I should have paid more attention to Mark's rants about his inbox getting spammed with this series in those old threads ;) I guess moving forward I will use get_maintainer.pl and refine my git-send scripts with only interested folks. Any words of advice on when to and when not to CC someone remotely connected to a series is welcome. @Sekhar, let's keep only linux-omap, linux-davinci and few other interested folks on the CC chain for the rest of review on the series. Thanks, -Joel -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 08/12/2013 12:56 AM, Sekhar Nori wrote: > 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@ti.com> > > No need for a separate patch for this, just do this in the patch where > you include the two linked sets. Ok, I dropped this patch. Anyway, most of this patch has gone away now because of other changes you suggested. Thanks, -Joel -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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++; + for (i = 0; i < num_slots_needed; i++) { if (echan->slot[i] < 0) { echan->slot[i] =
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@ti.com> --- drivers/dma/edma.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)