Re: [PATCH] dmaengine: imx-sdma - correct the dma transfer residue calculation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Greg,

On 26/02/2017 at 11:22:46 +0100, Greg KH wrote:
> On Sat, Feb 25, 2017 at 06:49:56PM -0300, Fabio Estevam wrote:
> > From: Nandor Han <nandor.han@xxxxxx>
> > 
> > commit 85f57752b33cf12f1d583f0c10b752292de00abe upstream.
> > 
> > The residue calculation was taking in consideration that dma
> > transaction status will be always retrieved in the dma callback
> > used to inform that dma transfer is complete. However this is not
> > the case for all subsystems that use dma. Some subsystems use a
> > timer to check the dma status periodically.
> > 
> > Therefore the calculation was updated and residue is calculated
> > accordingly by a) update the residue calculation taking in
> > consideration the last used buffer index by using *buf_ptail* variable
> > and b) chn_real_count (number of bytes transferred) is initialized to
> > zero, when dma channel is created, to avoid using an uninitialized
> > value in residue calculation when dma status is checked without
> > waiting dma complete event.
> > 
> > Cc: <stable@xxxxxxxxxxxxxxx> # 4.9.x
> > Signed-off-by: Nandor Han <nandor.han@xxxxxx>
> > Acked-by: Peter Senna Tschudin <peter.senna@xxxxxxxxxxxxx>
> > Tested-by: Peter Senna Tschudin <peter.senna@xxxxxxxxxxxxx>
> > Tested-by: Marek Vasut <marex@xxxxxxx>
> > Signed-off-by: Vinod Koul <vinod.koul@xxxxxxxxx>
> > ---
> >  drivers/dma/imx-sdma.c | 13 +++++++++----
> >  1 file changed, 9 insertions(+), 4 deletions(-)
> 
> So you want this in the 4.9-stable tree?  Why?  Can we get an ack from
> the maintainer and developers of the patch?  And why didn't you sign off
> on it as well?
> 

Yes, this solves a real issue, particularly seen (well, heard) when
playing audio.
Interesting part of the thread starts here:
http://lists.infradead.org/pipermail/linux-arm-kernel/2017-February/488393.html


-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]