Re: [PATCH] dmaengine: qcom-bam: fix circular buffer handling

2019-06-19 Thread Sricharan R
Hi Srini, On 6/18/2019 10:20 PM, Srinivas Kandagatla wrote: > > > On 18/06/2019 17:27, Sricharan R wrote: >>   The Macro's expect that buffer size is power of 2. So we are infact >> passing the actual correct >>   size ( MAX_DESCRIPTORS + 1 = 4096) > This will make the circular buffer macros

Re: [PATCH] dmaengine: qcom-bam: fix circular buffer handling

2019-06-18 Thread Srinivas Kandagatla
On 18/06/2019 17:27, Sricharan R wrote: The Macro's expect that buffer size is power of 2. So we are infact passing the actual correct size ( MAX_DESCRIPTORS + 1 = 4096) This will make the circular buffer macros happy but question is that do we actually have that many descriptor

Re: [PATCH] dmaengine: qcom-bam: fix circular buffer handling

2019-06-18 Thread Sricharan R
On 6/18/2019 8:42 PM, Srinivas Kandagatla wrote: > > > On 18/06/2019 15:56, Sricharan R wrote: >>    So MAX_DESCRIPTORS is used in driver for masking head/tail pointers. >>    That's why we have to pass MAX_DESCRIPTORS + 1 so that it works >>    when the Macros does a size - 1 > Isn't that

Re: [PATCH] dmaengine: qcom-bam: fix circular buffer handling

2019-06-18 Thread Srinivas Kandagatla
On 18/06/2019 15:56, Sricharan R wrote: So MAX_DESCRIPTORS is used in driver for masking head/tail pointers. That's why we have to pass MAX_DESCRIPTORS + 1 so that it works when the Macros does a size - 1 Isn't that incorrect to do that, pretending to have more descriptors than we

Re: [PATCH] dmaengine: qcom-bam: fix circular buffer handling

2019-06-18 Thread Sricharan R
Hi Srini, On 6/18/2019 8:20 PM, Srinivas Kandagatla wrote: > Hi Sricharan, > > On 18/06/2019 08:13, Sricharan R wrote: >> Hi Srini, >> >> On 6/14/2019 7:50 PM, Srinivas Kandagatla wrote: >>> For some reason arguments to most of the circular buffers >>> macros are used in reverse, tail is used

Re: [PATCH] dmaengine: qcom-bam: fix circular buffer handling

2019-06-18 Thread Srinivas Kandagatla
Hi Sricharan, On 18/06/2019 08:13, Sricharan R wrote: Hi Srini, On 6/14/2019 7:50 PM, Srinivas Kandagatla wrote: For some reason arguments to most of the circular buffers macros are used in reverse, tail is used for head and vice versa. This leads to bam thinking that there is an extra

Re: [PATCH] dmaengine: qcom-bam: fix circular buffer handling

2019-06-18 Thread Srinivas Kandagatla
Hi Sricharan, On 18/06/2019 08:13, Sricharan R wrote: Hi Srini, On 6/14/2019 7:50 PM, Srinivas Kandagatla wrote: For some reason arguments to most of the circular buffers macros are used in reverse, tail is used for head and vice versa. This leads to bam thinking that there is an extra

Re: [PATCH] dmaengine: qcom-bam: fix circular buffer handling

2019-06-18 Thread Sricharan R
Hi Srini, On 6/14/2019 7:50 PM, Srinivas Kandagatla wrote: > For some reason arguments to most of the circular buffers > macros are used in reverse, tail is used for head and vice versa. > > This leads to bam thinking that there is an extra descriptor at the > end and leading to retransmitting

Re: [PATCH] dmaengine: qcom-bam: fix circular buffer handling

2019-06-17 Thread Vinod Koul
On 14-06-19, 15:20, Srinivas Kandagatla wrote: > For some reason arguments to most of the circular buffers > macros are used in reverse, tail is used for head and vice versa. > > This leads to bam thinking that there is an extra descriptor at the > end and leading to retransmitting descriptor

Re: [PATCH] dmaengine: qcom-bam: fix circular buffer handling

2019-06-14 Thread Andy Gross
On Fri, Jun 14, 2019 at 03:20:12PM +0100, Srinivas Kandagatla wrote: > For some reason arguments to most of the circular buffers > macros are used in reverse, tail is used for head and vice versa. > > This leads to bam thinking that there is an extra descriptor at the > end and leading to

[PATCH] dmaengine: qcom-bam: fix circular buffer handling

2019-06-14 Thread Srinivas Kandagatla
For some reason arguments to most of the circular buffers macros are used in reverse, tail is used for head and vice versa. This leads to bam thinking that there is an extra descriptor at the end and leading to retransmitting descriptor which was not scheduled by any driver. This happens after