mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Vinod Koul <vinod.koul@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, Dan Williams <djbw@fb.com>,
	Arnd Bergmann <arnd@arndb.de>,
	linus.walleij@linaro.org, Jon Hunter <jon-hunter@ti.com>,
	Stephen Warren <swarren@nvidia.com>,
	Benoit Cousson <b-cousson@ti.com>,
	Shawn Guo <shawn.guo@linaro.org>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Sascha Hauer <kernel@pengutronix.de>,
	Kukjin Kim <kgene.kim@samsung.com>,
	viresh kumar <viresh.kumar@linaro.org>,
	Paul Mundt <lethal@linux-sh.org>
Subject: Re: [PATCH] dmaengine: add dmanegine slave map api's
Date: Mon, 17 Sep 2012 22:57:53 +0100	[thread overview]
Message-ID: <20120917215753.GS12245@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1347875429.1943.141.camel@vkoul-udesk3>

On Mon, Sep 17, 2012 at 03:20:29PM +0530, Vinod Koul wrote:
> On Mon, 2012-09-17 at 09:36 +0100, Russell King - ARM Linux wrote:
> > > > I'm not saying take the slave_id out of the map.  I'm saying, let the
> > > > DMA engine driver itself figure out what dma_chan to return. 
> > > But wont that assume the dma controller knows which channel to allocate.
> > > And how would it know this information? This can be problematic for hard
> > > wired muxes, but can be easily done for controller which have
> > > programmable mux.
> > 
> > Well, as I have already said, at the moment you're returning the _first_
> > _free_ _channel_ on a DMA device, which almost certainly will always be
> > the wrong one. 
> Yes I overlooked, the continue is wrong. It needs to move to next
> available channel. I have fixed it.
> 
> Now on the question if we should allow dmaengine to select channel or
> let dma engine driver do that, I don't see how that helps for hard wired
> muxes where dma engine driver doesn't know anything of mapping.
> 
> For your OMAP dma this wont matter as I think you have a programmable
> mux so you maybe able to use any channel with rightly programmed mux,
> right?

Except that we expose one 'channel' per mux setting, so as far as DMA
engine goes, the mux number _is_ the channel number - which is the same
approach taken by the PL08x and sa11x0 DMA engine drivers.  It is the
only sane approach to dealing with N hardware channels vs >>N clients.

  reply	other threads:[~2012-09-17 21:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14  9:33 Vinod Koul
2012-09-14  9:39 ` [RFC] " Vinod Koul
2012-09-14  9:41 ` [PATCH] " Russell King - ARM Linux
2012-09-14 10:51   ` Vinod Koul
2012-09-14 11:18     ` Russell King - ARM Linux
2012-09-17  3:40       ` Vinod Koul
2012-09-17  8:36         ` Russell King - ARM Linux
2012-09-17  9:50           ` Vinod Koul
2012-09-17 21:57             ` Russell King - ARM Linux [this message]
2012-09-18  3:18               ` Vinod Koul
2012-09-18 12:20                 ` Linus Walleij
2012-09-18 20:52                   ` Russell King - ARM Linux
2012-09-18 21:04                     ` Linus Walleij

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=20120917215753.GS12245@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=arnd@arndb.de \
    --cc=b-cousson@ti.com \
    --cc=djbw@fb.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=jon-hunter@ti.com \
    --cc=kernel@pengutronix.de \
    --cc=kgene.kim@samsung.com \
    --cc=lethal@linux-sh.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shawn.guo@linaro.org \
    --cc=swarren@nvidia.com \
    --cc=vinod.koul@linux.intel.com \
    --cc=viresh.kumar@linaro.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

all inboxes | Powered by JetHome®