linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Jonathan Cameron <jic23@kernel.org>,
	Alexandru Ardelean <ardeleanalex@gmail.com>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Alexandru Ardelean <alexandru.ardelean@analog.com>,
	linux-iio <linux-iio@vger.kernel.org>
Subject: Re: [PATCH] iio: buffer-dmaengine: adjust `bytes_used` with residue info
Date: Sat, 29 Aug 2020 20:30:04 +0200	[thread overview]
Message-ID: <f336acac-ed70-ad88-57ca-8d06ec54182e@metafoo.de> (raw)
In-Reply-To: <20200829165134.3361315a@archlinux>

On 8/29/20 5:51 PM, Jonathan Cameron wrote:
> On Wed, 26 Aug 2020 09:36:39 +0300
> Alexandru Ardelean <ardeleanalex@gmail.com> wrote:
>
>> On Wed, Aug 26, 2020 at 8:22 AM Lars-Peter Clausen <lars@metafoo.de> wrote:
>>> From: Alexandru Ardelean <alexandru.ardelean@analog.com>
>>>
>>> A transfer may fall shorter than the bytes in the block.
>>> This information is available in the residue from the DMA engine, so we can
>>> compute actual `bytes_used` with that by subtracting the residue.
>>>   
>> This was in my pipeline as well [obviously].
>> Thanks :)
>>
>>> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
>>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> "smells" like a fix.  Is it?  Or are we looking at something that
> only matters for some future hardware, or an optmization?
>
> If it's a fix, where is the fixes tag?

It's a feature :)

When we first added the IIO DMA buffer support this API did not exist in 
dmaengine. So for the longest time most DMA drivers did not have the 
ability to report short transfers. Primarily because in many cases the 
hardware doesn't even support it.

Now with this patch the IIO DMA buffer implementation supports systems 
where the DMA can generate short transfers.

- Lars


  reply	other threads:[~2020-08-29 18:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-26  5:20 [PATCH] iio: buffer-dmaengine: adjust `bytes_used` with residue info Lars-Peter Clausen
2020-08-26  6:36 ` Alexandru Ardelean
2020-08-29 15:51   ` Jonathan Cameron
2020-08-29 18:30     ` Lars-Peter Clausen [this message]
2020-08-30 11:10       ` Jonathan Cameron

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=f336acac-ed70-ad88-57ca-8d06ec54182e@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alexandru.ardelean@analog.com \
    --cc=ardeleanalex@gmail.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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;
as well as URLs for NNTP newsgroup(s).