linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jassisinghbrar@gmail.com (Jassi Brar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM:SAMSUNG: Move S3C DMA driver to drivers/dma
Date: Wed, 8 Jun 2011 01:16:40 +0530	[thread overview]
Message-ID: <BANLkTikLFCyzU3UApjjwfX0Vjujo9WAFZA@mail.gmail.com> (raw)
In-Reply-To: <20110607182923.GA28451@n2100.arm.linux.org.uk>

On Tue, Jun 7, 2011 at 11:59 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
>> The discussion did take off a few months ago, but we didn't reach anywhere.
>> Being able to queue request from the 'done' callback, the need of
>> circular buffer
>> API (possibly a free-running one too) and callbacks in irq-context, as
>> they happen,
>> were a few requirements for having fast peripherals with shallow fifo
>> work without underruns.
>
> I can see why you have these concerns; the problem is the slave DMA
> engine API was never properly documented.
>
> 1. The slave API does permit the done callback to submit new requests
> ? already (and any DMA engine driver which doesn't allow that is broken.)
>
> Note that slave APIs _should_ permit several requests to be queued up
> and as each finish, the next one should be started. ?In other words,
> once DMA has started it should continue until there is no more work for
> the DMA engine to perform.
>
> 2. Circular buffer support has been added - see device_prep_dma_cyclic().
>
> However, 2 is not really a requirement for audio - you can queue several
> single slave transfers (one per period) initially, and then you get
> callbacks as each transfer completes. ?In the callback, you can submit
> an additional buffer, and continue doing so causing DMA to never end.
>
> I believe that this is a saner approach than the circular buffer support,
> and its what I tried to put together for the AMBA PL041 AACI DMA (but
> unfortunately, ARMs platforms are totally broken when it comes to DMA.)
>
> This also removes the need for the callback to be in IRQ context.
>
> So I don't see that anything you've mentioned is a problem with the API
> as it stands today - there may be issues with the way the DMA engine
> driver has been implemented which cause it not to conform to what I've
> said above, but those are driver bugs and not a fault of the API.

Yes, after reading Vinod's mail, I did see that CYCLIC option has been added.
Though I am still not sure how effective would that be for fast
peripherals(please
have a look at my reply to Mark's post), when doing callbacks from
tasklets scheduled
from irq-handlers is the norm with dma drivers of generic api.
Playing regular audio is no problem, but playing pro quality over
SPDIF with active multimedia h/w, sometimes is for some devices.

Besides, people might have different work priorities atm. I don't
think anybody believes we can do without common APIs.

Btw, Samsung DMA API doesn't support the 'free-running' circular
buffer either. But that was my planned TODO while I was there and I
think someone is working on it(?)

IMHO Samsung SoC team (not his majesty Mr Kyungmin Park) are justified if they
are not so eager right now. Since I no more would have to spend
sleepless nights over
SPDIF underruns, I can side with what Kukjin Kim(Samsung maintainer)
decides, who has to live with the results.

Thanks,
Jassi

  parent reply	other threads:[~2011-06-07 19:46 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-07  7:48 [PATCH] ARM:SAMSUNG: Move S3C DMA driver to drivers/dma root
2011-06-07  8:00 ` Kyungmin Park
2011-06-07  8:09   ` Jassi Brar
2011-06-07  8:15     ` Russell King - ARM Linux
2011-06-07  8:35       ` Kyungmin Park
2011-06-07 10:15       ` Jassi Brar
2011-06-07 18:29         ` Russell King - ARM Linux
2011-06-07 18:43           ` Mark Brown
2011-06-07 19:01             ` Jassi Brar
2011-06-07 21:41               ` Mark Brown
2011-06-08  2:51                 ` Jassi Brar
2011-06-08  8:55                   ` Mark Brown
2011-06-07 22:28               ` Russell King - ARM Linux
2011-06-08  4:05                 ` Jassi Brar
2011-06-08  7:44                   ` Russell King - ARM Linux
2011-06-07 19:46           ` Jassi Brar [this message]
2011-06-07 22:36             ` Russell King - ARM Linux
2011-06-09 18:24               ` Kukjin Kim
2011-06-16 12:56                 ` Kyungmin Park
2011-06-23  6:47                   ` Kukjin Kim
2011-06-07 10:15     ` Linus Walleij
2011-06-07 10:05       ` Koul, Vinod
2011-06-07  8:01 ` Jassi Brar
2011-06-07 15:42 ` Tushar Behera

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=BANLkTikLFCyzU3UApjjwfX0Vjujo9WAFZA@mail.gmail.com \
    --to=jassisinghbrar@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).