From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Cc: Dan Williams <dan.j.williams@intel.com>,
Timur Tabi <timur@freescale.com>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: dmaengine.c: question about device_alloc_chan_resources
Date: Sun, 21 Sep 2008 21:50:18 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.64.0809212139040.7264@axis700.grange> (raw)
In-Reply-To: <20080921112605.1e00b92b@hskinnemo-gx745.norway.atmel.com>
On Sun, 21 Sep 2008, Haavard Skinnemoen wrote:
> > 2/ What about platform specific concerns where dma_cap_mask_t is not
> > descriptive enough e.g. only one memcpy channel can address a certain
> > bus? Currently a client implementation can have some intelligence to
> > return DMA_DUP for channels that do not have the platform capability.
>
> Currently, clients requesting the DMA_SLAVE capability can specify
> which particular DMA device they need. Would it make sense to allow
> other clients to do that as well?
This is how it is documented in dmaengine.h:
* @slave: data for preparing slave transfer. Must be non-NULL iff the
* DMA_SLAVE capability is requested.
But, looking at dma_client_chan_alloc() it seems, any client requesting a
channel can provide a slave and link it to a specific dma_dev, regardless
what capabilities the client is requesting, or am I missing something? If
so, then yes, please, let's allow all do this. Wouldn't it be better to
move the .dma_dev member to dma_client?
> Also, struct dma_slave can be extended with
> controller-/platform-specific fields. Maybe we need a similar mechanism
> for passing platform-specific constraints when requesting "regular"
> channels?
As far as I understand, this extension can only be done by "wrapping"
dma_slave with driver-specific data:
* If dma_dev is non-NULL, the client can not be bound to other DMA
* masters than the one corresponding to this device. The DMA master
* driver may use this to determine if there is controller-specific
* data wrapped around this struct. Drivers of platform code that sets
* the dma_dev field must therefore make sure to use an appropriate
* controller-specific dma slave structure wrapping this struct.
i.e., there is no "void *priv" or similar. So, the same "wrapping" can be
used with dma_client, even more conveniently so, if we move .dma_dev into
it.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
next prev parent reply other threads:[~2008-09-21 19:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-16 21:30 Timur Tabi
2008-09-17 22:36 ` Dan Williams
2008-09-18 14:13 ` Timur Tabi
2008-09-18 14:28 ` Haavard Skinnemoen
2008-09-18 14:31 ` Timur Tabi
2008-09-18 14:45 ` Haavard Skinnemoen
2008-09-18 14:49 ` Timur Tabi
2008-09-18 15:00 ` Haavard Skinnemoen
2008-09-19 4:20 ` Dan Williams
2008-09-19 11:25 ` Haavard Skinnemoen
2008-09-19 14:34 ` Timur Tabi
2008-09-19 14:50 ` linux-os (Dick Johnson)
2008-09-19 15:01 ` Timur Tabi
2008-09-19 15:28 ` Alan Cox
2008-09-20 23:00 ` Dan Williams
2008-09-21 9:26 ` Haavard Skinnemoen
2008-09-21 19:50 ` Guennadi Liakhovetski [this message]
2008-09-22 7:44 ` Haavard Skinnemoen
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=Pine.LNX.4.64.0809212139040.7264@axis700.grange \
--to=g.liakhovetski@gmx.de \
--cc=dan.j.williams@intel.com \
--cc=haavard.skinnemoen@atmel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=timur@freescale.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
all inboxes | Powered by JetHome®