linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH 1/6] dma: rcar-dma: add wait after stopping dma engine
Date: Wed, 08 Jun 2016 14:23:32 +0000	[thread overview]
Message-ID: <5197988.uOT2ptzirX@avalon> (raw)
In-Reply-To: <1443559488-2416-2-git-send-email-hamzahfrq.sub@gmail.com>

Hi Morimoto-san,

On Wednesday 08 Jun 2016 10:05:09 Kuninori Morimoto wrote:
> Hi Laurent
> # add Niklas
> 
> Sorry for my suport late response.
> Thanks Niklas for reminder
> 
> > (With a question for Morimoto-san below)
> 
> (snip)
> 
> > > >> +     } while (++i < NR_READS_TO_WAIT);
> > > > 
> > > > How long does the DMA engine typically need to stop ? Is there a safe
> > > > upper bound ?
> > > 
> > > I have tested it many times. The highest number of retries was 3 which
> > > occurred not very frequently. Normally it is 1-2
> > 
> > Morimoto-san, could you check with the hardware team if there's a worst
> > case guarantee regarding how long the channel could take to stop ?
> 
> You need to wait maximum 0.7ms for it.
> both for Gen2/Gen3.
> In worst case, it needs 8 request times.
> If 1 request is 20,000 cycle
> 
> 	20,000cycle x 8request x [4ns/cylce] = 640,000ns > 700us

And we're calling the wait function both from interrupt context and from user 
context with a spinlock held. I'm afraid that's not acceptable, we can't busy-
loop for so long with interrupts disabled.

-- 
Regards,

Laurent Pinchart


      parent reply	other threads:[~2016-06-08 14:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29 20:44 [PATCH 1/6] dma: rcar-dma: add wait after stopping dma engine hamzahfrq.sub
2015-10-12 14:56 ` Vinod Koul
2015-10-15 15:58 ` Laurent Pinchart
2015-10-15 16:02 ` Hamza Farooq
2015-10-15 16:08 ` Hamza Farooq
2015-10-15 20:42 ` Laurent Pinchart
2015-10-19 20:54 ` Hamza Farooq
2015-10-19 21:06 ` Laurent Pinchart
2015-10-20 12:30 ` Hamza Farooq
2016-06-08 10:05 ` Kuninori Morimoto
2016-06-08 14:23 ` Laurent Pinchart [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=5197988.uOT2ptzirX@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-sh@vger.kernel.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).