linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org,
	Magnus Damm <magnus.damm@gmail.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	linux-mmc@vger.kernel.org, alsa-devel@alsa-project.org,
	linux-serial@vger.kernel.org, Paul Mundt <lethal@linux-sh.org>
Subject: Re: [PATCH 1/7 v2] dmaengine: add a simple dma library
Date: Tue, 31 Jan 2012 12:11:30 +0530	[thread overview]
Message-ID: <1327992090.1527.116.camel@vkoul-udesk3> (raw)
In-Reply-To: <Pine.LNX.4.64.1201300944360.7932@axis700.grange>

On Mon, 2012-01-30 at 10:34 +0100, Guennadi Liakhovetski wrote:
> > I don't still comprehend the need for a library on top of dmaengine
> > which gain is just a library between clients and dmacs. Surely we don't
> > want to write another abstraction on top of one provided?
> > 
> > If the question is to handle scatter-gather even if the hardware doesn't
> > have the capability, then why don't add that in dmaengine itself rather
> > than one more layer?
> 
> Well, yes, adding new abstraction layers is always a decision, that has to 
> be well justified. In this case it does at least make the life easier for 
> two sh-mobile drivers: shdma and the new SUDMAC driver.
> 
> However, I did name the library in a generic way without reference to sh, 
> assuming, that it might with time become useful for other architectures 
> too. The reasons why I prefered to keep it as an optional addition to 
> dmaengine core, instead of tightly integrating it with it are, that (1) I 
> did not want to add useless code to drivers, that do not need it, 
So are we sure that only sh-mobile drivers need this capablity?
Btw does you hardware only support single transfers and no sg support,
would this remain the same in future?
> (2) I am 
> not sure if and when this library will become useful for other drivers: 
> apart from sh I am only familiar with one more dmaengine driver: 
> ipu/ipu_idmac.c, and that one supports scatter-gather lists in a limited 
> way and has some further peculiarities, that would likely make it a bad 
> match for the simple DMA library,
typically the dmacs will support this in some form or other, so your
point is valid :)
>  (3) keeping it separate makes its 
> further development easier.
> 
> OTOH, I'm certainly fine with a tighter library integration with the 
> dmaengine core. I think, it still would be better to keep it in a separate 
> file and only build it if needed, right? This woult also simplify code 
> debugging and further development. I can remove the "simple" notation, 
> which does make it look like an additional abstraction layer, and replace 
> it with, say, sgsoft (scatter-gather software implementation)?
that would be more apt :)
>  A more 
> interesting question is what to do with struct dma_simple_dev, struct 
> dma_simple_chan, struct dma_simple_desc, that embed struct dma_device, 
> struct dma_chan and struct dma_async_tx_descriptor respectively. I don't 
> think we want to merge all the additions from those wrapping structs back 
> into their dmaengine counterparts?
Sure they should be kept separate. I like the wrapping, this keeps it
simple.
> 
> How would you like to do this? Don't you think, it would be good to allow 
> both: either implement a dmaengine driver directly, exactly as all drivers 
> are doing now, or use the additional helper library for suitable (simple) 
> hardware types? I see it similar to I2C, where you either implement an I2C 
> driver directly, or you use the bitbanging abstraction for simpler 
> hardware.
I think it would be good to have both, this can be used by folks who
don't have sg support available.

-- 
~Vinod


  reply	other threads:[~2012-01-31  6:40 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-26 14:56 [PATCH 0/7 v2] extract a simple dmaengine library from shdma.c Guennadi Liakhovetski
2012-01-26 14:56 ` [PATCH 1/7 v2] dmaengine: add a simple dma library Guennadi Liakhovetski
2012-01-26 17:34   ` [alsa-devel] " Sascha Hauer
2012-01-26 21:07     ` Guennadi Liakhovetski
2012-01-27  8:37   ` Shimoda, Yoshihiro
2012-01-27  8:48     ` Guennadi Liakhovetski
2012-01-31 11:03       ` Shimoda, Yoshihiro
2012-02-01  0:52         ` Guennadi Liakhovetski
2012-02-01  2:47           ` Shimoda, Yoshihiro
2012-02-02 22:19         ` Guennadi Liakhovetski
2012-02-03  8:47           ` Shimoda, Yoshihiro
2012-02-03 10:21             ` Guennadi Liakhovetski
2012-02-03 15:43             ` [PATCH/RFC] usb: fix renesas_usbhs to not schedule in atomic context Guennadi Liakhovetski
2012-02-05 14:54               ` Felipe Balbi
2012-02-06 10:11                 ` Guennadi Liakhovetski
2012-02-06 10:31                   ` Felipe Balbi
2012-02-06  8:52               ` Shimoda, Yoshihiro
2012-01-30  8:32   ` [PATCH 1/7 v2] dmaengine: add a simple dma library Vinod Koul
2012-01-30  9:34     ` Guennadi Liakhovetski
2012-01-31  6:41       ` Vinod Koul [this message]
2012-01-31  8:59         ` Guennadi Liakhovetski
2012-02-01  5:38           ` Vinod Koul
2012-02-03 16:38             ` Guennadi Liakhovetski
2012-02-06  2:54   ` Vinod Koul
2012-02-06  9:53     ` Guennadi Liakhovetski
2012-01-26 14:56 ` [PATCH 2/7 v2] dma: shdma: prepare for simple DMA conversion Guennadi Liakhovetski
2012-01-26 14:56 ` [PATCH 3/7 v2] mmc: sh_mmcif: remove unneeded struct sh_mmcif_dma, prepare for simple DMA Guennadi Liakhovetski
2012-01-26 14:56 ` [PATCH 4/7 v2] mmc: sh_mobile_sdhi: prepare for conversion to " Guennadi Liakhovetski
2012-01-26 14:56 ` [PATCH 5/7 v2] serial: sh-sci: " Guennadi Liakhovetski
2012-01-26 14:56 ` [PATCH 6/7 v2] ASoC: SIU: " Guennadi Liakhovetski
2012-02-06  2:33   ` Vinod Koul
2012-02-06  9:11     ` Guennadi Liakhovetski
2012-01-26 14:56 ` [PATCH 7/7 v2] dma: shdma: convert to the simple DMA library Guennadi Liakhovetski

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=1327992090.1527.116.camel@vkoul-udesk3 \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=g.liakhovetski@gmx.de \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /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).