From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Richard Zhao <linuxzsc@gmail.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Cc: Stephen Warren <swarren@wwwdotorg.org>,
"vinod.koul@intel.com" <vinod.koul@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Richard Zhao <rizhao@nvidia.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] DMA: let filter functions of of_dma_simple_xlate possible check of_node
Date: Mon, 26 Aug 2013 15:18 +0200 [thread overview]
Message-ID: <2811939.DFy94j5OEx@avalon> (raw)
In-Reply-To: <20130826125547.GA2733@richard-laptop>
Hi Richard,
(Dropping Dan Williams from the CC list as his e-mail address doesn't seem to
be valid anymore)
On Monday 26 August 2013 20:55:57 Richard Zhao wrote:
> On Mon, Aug 26, 2013 at 02:17:43PM +0200, Laurent Pinchart wrote:
> > On Friday 23 August 2013 09:57:43 Stephen Warren wrote:
> > > On 08/22/2013 07:29 PM, Richard Zhao wrote:
> > > > On Fri, Aug 23, 2013 at 04:18:27AM +0800, Stephen Warren wrote:
> > > >> On 08/21/2013 11:19 PM, Richard Zhao wrote:
> > > >>> On Fri, Aug 02, 2013 at 10:00:00AM +0800, Richard Zhao wrote:
> > > >>>> pass of_phandle_args dma_spec to dma_request_channel in
> > > >>>> of_dma_simple_xlate, so the filter function could access of_node in
> > > >>>> of_phandle_args.
> > > >>>>
> > > >>>> It also remove restriction of #dma-cells has to be one.
> > > >>>>
> > > >>>> Signed-off-by: Richard Zhao <rizhao@nvidia.com>
> > > >>>> ---
> > > >>>>
> > > >>>> drivers/dma/edma.c | 7 +++++--
> > > >>>> drivers/dma/of-dma.c | 10 ++++------
> > > >>>> drivers/dma/omap-dma.c | 6 ++++--
> > > >>>> 3 files changed, 13 insertions(+), 10 deletions(-)
> > > >>>
> > > >>> Hi Vinod,
> > > >>>
> > > >>> Can you please pick up this change?
> > > >>>
> > > >>> Hi Stephen,
> > > >>>
> > > >>> Can you please give a ack or reviewed-by etc?
> > > >>
> > > >> Hmm. Looking at the patch, I'm not sure it's right.
> > > >>
> > > >> This patch simply passes all the specfier args to the filter
> > > >> function, and the code to check the equality of the of_node to the
> > > >> filter args is still duplicated in each DMA driver. Instead, the DMA
> > > >> core should be implementing the equality check, and only even calling
> > > >> the driver-specific filter function for devices where the client's
> > > >> phandle matches the DMA providing device's of_node handle.
> > > >
> > > > Filter function is called in dmaengine core code, independent of dt.
> > >
> > > The core code can still check if a dmaengine's driver was instantiated
> > > from DT and take additional actions in that case.
> > >
> > > > And the reason why the driver has to write its own filter function is
> > > > it has to store slave id there in its own way.
> > >
> > > I'm not saying don't call the driver's filter function, but rather that
> > > the dmaengine core should perform the common checks before doing so.
> >
> > And it looks to me like the common case could even get rid of the driver's
> > filter function:
> >
> > https://lkml.org/lkml/2013/5/15/270
> > https://lkml.org/lkml/2013/3/25/250
>
> For general case, the slave id is not staticly bind to a specific channel.
Certainly not in all cases, but I think it's common enough to deserve a
specific helper function.
--
Regards,
Laurent Pinchart
WARNING: multiple messages have this Message-ID (diff)
From: laurent.pinchart@ideasonboard.com (Laurent Pinchart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] DMA: let filter functions of of_dma_simple_xlate possible check of_node
Date: Mon, 26 Aug 2013 15:18 +0200 [thread overview]
Message-ID: <2811939.DFy94j5OEx@avalon> (raw)
In-Reply-To: <20130826125547.GA2733@richard-laptop>
Hi Richard,
(Dropping Dan Williams from the CC list as his e-mail address doesn't seem to
be valid anymore)
On Monday 26 August 2013 20:55:57 Richard Zhao wrote:
> On Mon, Aug 26, 2013 at 02:17:43PM +0200, Laurent Pinchart wrote:
> > On Friday 23 August 2013 09:57:43 Stephen Warren wrote:
> > > On 08/22/2013 07:29 PM, Richard Zhao wrote:
> > > > On Fri, Aug 23, 2013 at 04:18:27AM +0800, Stephen Warren wrote:
> > > >> On 08/21/2013 11:19 PM, Richard Zhao wrote:
> > > >>> On Fri, Aug 02, 2013 at 10:00:00AM +0800, Richard Zhao wrote:
> > > >>>> pass of_phandle_args dma_spec to dma_request_channel in
> > > >>>> of_dma_simple_xlate, so the filter function could access of_node in
> > > >>>> of_phandle_args.
> > > >>>>
> > > >>>> It also remove restriction of #dma-cells has to be one.
> > > >>>>
> > > >>>> Signed-off-by: Richard Zhao <rizhao@nvidia.com>
> > > >>>> ---
> > > >>>>
> > > >>>> drivers/dma/edma.c | 7 +++++--
> > > >>>> drivers/dma/of-dma.c | 10 ++++------
> > > >>>> drivers/dma/omap-dma.c | 6 ++++--
> > > >>>> 3 files changed, 13 insertions(+), 10 deletions(-)
> > > >>>
> > > >>> Hi Vinod,
> > > >>>
> > > >>> Can you please pick up this change?
> > > >>>
> > > >>> Hi Stephen,
> > > >>>
> > > >>> Can you please give a ack or reviewed-by etc?
> > > >>
> > > >> Hmm. Looking at the patch, I'm not sure it's right.
> > > >>
> > > >> This patch simply passes all the specfier args to the filter
> > > >> function, and the code to check the equality of the of_node to the
> > > >> filter args is still duplicated in each DMA driver. Instead, the DMA
> > > >> core should be implementing the equality check, and only even calling
> > > >> the driver-specific filter function for devices where the client's
> > > >> phandle matches the DMA providing device's of_node handle.
> > > >
> > > > Filter function is called in dmaengine core code, independent of dt.
> > >
> > > The core code can still check if a dmaengine's driver was instantiated
> > > from DT and take additional actions in that case.
> > >
> > > > And the reason why the driver has to write its own filter function is
> > > > it has to store slave id there in its own way.
> > >
> > > I'm not saying don't call the driver's filter function, but rather that
> > > the dmaengine core should perform the common checks before doing so.
> >
> > And it looks to me like the common case could even get rid of the driver's
> > filter function:
> >
> > https://lkml.org/lkml/2013/5/15/270
> > https://lkml.org/lkml/2013/3/25/250
>
> For general case, the slave id is not staticly bind to a specific channel.
Certainly not in all cases, but I think it's common enough to deserve a
specific helper function.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2013-08-26 13:18 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-02 2:00 [PATCH] DMA: let filter functions of of_dma_simple_xlate possible check of_node Richard Zhao
2013-08-02 2:00 ` Richard Zhao
2013-08-02 2:00 ` Richard Zhao
2013-08-02 12:06 ` Santosh Shilimkar
2013-08-02 12:06 ` Santosh Shilimkar
2013-08-02 12:06 ` Santosh Shilimkar
2013-08-02 20:52 ` Stephen Warren
2013-08-02 20:52 ` Stephen Warren
2013-08-22 5:19 ` Richard Zhao
2013-08-22 5:19 ` Richard Zhao
2013-08-22 20:18 ` Stephen Warren
2013-08-22 20:18 ` Stephen Warren
2013-08-23 1:29 ` Richard Zhao
2013-08-23 1:29 ` Richard Zhao
2013-08-23 15:57 ` Stephen Warren
2013-08-23 15:57 ` Stephen Warren
2013-08-26 12:17 ` Laurent Pinchart
2013-08-26 12:17 ` Laurent Pinchart
2013-08-26 12:55 ` Richard Zhao
2013-08-26 12:55 ` Richard Zhao
2013-08-26 13:18 ` Laurent Pinchart [this message]
2013-08-26 13:18 ` Laurent Pinchart
2013-08-26 14:10 ` Vinod Koul
2013-08-26 14:10 ` Vinod Koul
2013-08-26 18:15 ` Arnd Bergmann
2013-08-26 18:15 ` Arnd Bergmann
2013-08-28 5:37 ` Vinod Koul
2013-08-28 5:37 ` Vinod Koul
2013-08-26 14:49 ` Richard Zhao
2013-08-26 14:49 ` Richard Zhao
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=2811939.DFy94j5OEx@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linuxzsc@gmail.com \
--cc=rizhao@nvidia.com \
--cc=swarren@wwwdotorg.org \
--cc=vinod.koul@intel.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 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.