linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: zonque@gmail.com (Daniel Mack)
To: linux-arm-kernel@lists.infradead.org
Subject: [v2 rebased 1/2] dma: mmp_pdma: add support for residue reporting
Date: Wed, 14 Aug 2013 18:15:51 +0200	[thread overview]
Message-ID: <520BAD37.1070404@gmail.com> (raw)
In-Reply-To: <20130814124643.GP23006@n2100.arm.linux.org.uk>

On 14.08.2013 14:46, Russell King - ARM Linux wrote:
> On Wed, Aug 14, 2013 at 02:25:20PM +0200, Daniel Mack wrote:
>> In order to report the channel's residue, we have to memorize the first
>> dma buffer position when the channel is configured.
> 
> This is actually broken, and I'm surprised that Vinod even suggested it.
> 
> Think about what happens with a scatter-gather list where the addresses
> of each element really are scattered in memory.  Let's say that the
> N'th element is at a lower address than the first element, and we're on
> that N'th element.  What happens when curr is less than chan->start_addr
> here:

Yes, you're right of course.

Then, we have no other chance than walking the list of all linked
descriptors. I just implemented this and it works. That approach also
saves us to memorize the start_addr in the channel struct.

I'll resend both patches - could you have another look?


Thanks,
Daniel

      reply	other threads:[~2013-08-14 16:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-14 12:25 [v2 rebased 1/2] dma: mmp_pdma: add support for residue reporting Daniel Mack
2013-08-14 12:46 ` Russell King - ARM Linux
2013-08-14 16:15   ` Daniel Mack [this message]

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=520BAD37.1070404@gmail.com \
    --to=zonque@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).