linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: geert@linux-m68k.org (Geert Uytterhoeven)
To: linux-arm-kernel@lists.infradead.org
Subject: DMA engine API issue (was: [PATCH/RFC 0/5] R-Car Gen2 DMAC hardware descriptor list support)
Date: Mon, 4 Aug 2014 15:47:51 +0200	[thread overview]
Message-ID: <CAMuHMdWSe8m2yRV5fhLfZ=gbGUev6ExD+0eQ_nKK84SRs1DEwQ@mail.gmail.com> (raw)
In-Reply-To: <20140801143020.GQ30282@n2100.arm.linux.org.uk>

Hi Russell,

On Fri, Aug 1, 2014 at 4:30 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Fri, Aug 01, 2014 at 10:51:26AM +0200, Laurent Pinchart wrote:
>> I'll take this opportunity to question why we have a separation between
>> tx_submit and issue_pending. What's the rationale for that, especially given
>> that dma_issue_pending_all() might kick in at any point and issue pending
>> transfers for all devices. A driver could thus see its submitted but not
>> issued transactions being issued before it explicitly calls
>> dma_async_issue_pending().
>
> A prepared but not submitted transaction is not a pending transaction.
>
> The split is necessary so that a callback can be attached to the
> transaction.  This partially comes from the async-tx API, and also
> gets a lot of use with the slave API.
>
> The prepare function allocates the descriptor and does the initial
> setup, but does not mark the descriptor as a pending transaction.
> It returns the descriptor, and the caller is then free to add a
> callback function and data pointer to the descriptor before finally
> submitting it.  This sequence must occur in a timely manner as some
> DMA engine implementations hold a lock between the prepare and submit
> callbacks (Dan explicitly permits this as part of the API.)

I think you misunderstood the question: Laurent asked about
dmaengine_submit() (step 2) and dma_async_issue_pending() (step 3),
while your answer is about dmaengine_prep_slave_*() (step 1) and
dmaengine_submit() (step 2).

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  parent reply	other threads:[~2014-08-04 13:47 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1406032431-3807-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com>
     [not found] ` <87d2cwvmxa.wl%kuninori.morimoto.gx@gmail.com>
     [not found]   ` <3361994.F0HgAeJkR9@avalon>
2014-07-23 11:07     ` DMA engine API issue (was: [PATCH/RFC 0/5] R-Car Gen2 DMAC hardware descriptor list support) Laurent Pinchart
2014-07-24  0:46       ` Kuninori Morimoto
2014-07-24  1:35         ` Kuninori Morimoto
2014-07-24  4:53           ` Vinod Koul
2014-07-24  4:52       ` Vinod Koul
2014-08-01  8:51         ` Laurent Pinchart
2014-08-01 14:30           ` Russell King - ARM Linux
2014-08-01 17:09             ` Vinod Koul
2014-08-04 13:47             ` Geert Uytterhoeven [this message]
2014-08-04 17:00             ` Laurent Pinchart
2014-08-04 17:54               ` Russell King - ARM Linux
2014-08-05 23:19                 ` Laurent Pinchart
2014-08-06  7:17                   ` Geert Uytterhoeven
2014-08-06 11:04                     ` Arnd Bergmann
2014-08-01 17:07           ` Vinod Koul
2014-08-04 16:50             ` Laurent Pinchart
2014-08-04 18:03               ` DMA engine API issue Lars-Peter Clausen
2014-08-04 18:32                 ` Russell King - ARM Linux
2014-08-04 23:12                   ` Laurent Pinchart
2014-08-05 16:56               ` DMA engine API issue (was: [PATCH/RFC 0/5] R-Car Gen2 DMAC hardware descriptor list support) Vinod Koul
2014-07-24 12:29       ` [alsa-devel] DMA engine API issue Lars-Peter Clausen
2014-07-24 12:51       ` DMA engine API issue (was: [PATCH/RFC 0/5] R-Car Gen2 DMAC hardware descriptor list support) Russell King - ARM Linux
2014-08-01  9:24         ` Laurent Pinchart

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='CAMuHMdWSe8m2yRV5fhLfZ=gbGUev6ExD+0eQ_nKK84SRs1DEwQ@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --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).