All of lore.kernel.org
 help / color / mirror / Atom feed
From: marex@denx.de (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mxs/dma: Enlarge the CCW descriptor area to 4 pages
Date: Wed, 5 Sep 2012 03:46:39 +0200	[thread overview]
Message-ID: <201209050346.39253.marex@denx.de> (raw)
In-Reply-To: <20120905014000.GP2362@S2101-09.ap.freescale.net>

Dear Shawn Guo,

> On Tue, Sep 04, 2012 at 06:04:25AM +0200, Marek Vasut wrote:
> > In case of a large SPI flash, the amount of DMA descriptors
> > available to the DMA driver is not large enough anymore. For
> > example 8MB SPI flash now needs 129 descriptors to be transfered
> > in one long read. There are currently 53 descriptors available in
> > one PAGE_SIZE-big block. Enlarge the allocated descriptor area to
> > four PAGE_SIZE blocks to fulfill such requirements.
> > 
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Cc: Dan Williams <djbw@fb.com>
> > Cc: Fabio Estevam <fabio.estevam@freescale.com>
> > Cc: Shawn Guo <shawn.guo@linaro.org>
> 
> Acked-by: Shawn Guo <shawn.guo@linaro.org>
> 
> Vinod (copied) is the primary maintainer and collecting dma patches now.

Understood.

Let me ask about another thing. If there'll eventually be some device that'd 
need even larger transfer (say ... hundreds of megs) we'd end up with trouble 
again.

One way to fix this is to recycle descriptors that were already used during the 
transfer, but can we really do it fast enough, so the DMA would do it's job at 
one end of the descriptor chain and we'd be building the other?

The other (easier) way is to let the device that claims the particular DMA 
channel allocate as much descriptors as it might ever need, which I think is 
wrong.

What do you think ?

Best regards,
Marek Vasut

  reply	other threads:[~2012-09-05  1:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-04  4:04 [PATCH] mxs/dma: Enlarge the CCW descriptor area to 4 pages Marek Vasut
2012-09-05  1:40 ` Shawn Guo
2012-09-05  1:46   ` Marek Vasut [this message]
2012-09-05  2:39     ` Shawn Guo
2012-09-05  2:57       ` Marek Vasut
2012-09-14  3:06     ` Vinod Koul
2012-09-14  7:57       ` Marek Vasut
2012-09-14  8:30       ` Russell King - ARM Linux
2012-09-14  8:56         ` Vinod Koul
2012-09-14  3:06 ` Vinod Koul

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=201209050346.39253.marex@denx.de \
    --to=marex@denx.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.