DMA Engine development
 help / color / mirror / Atom feed
From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Daniel Mack <daniel@zonque.org>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Vinod Koul <vinod.koul@intel.com>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	dmaengine@vger.kernel.org
Subject: [02/15] ARM: pxa: add dma slave map
Date: Wed, 04 Apr 2018 21:21:55 +0200	[thread overview]
Message-ID: <87d0ze4w18.fsf@belgarion.home> (raw)

Arnd Bergmann <arnd@arndb.de> writes:

> On Tue, Apr 3, 2018 at 10:19 PM, Robert Jarzmik <robert.jarzmik@free.fr> wrote:
>> ... chop chop removing unneeded recipients ....
>>
>> Arnd Bergmann <arnd@arndb.de> writes:
>>> It still feels odd to me that there is an entry in the slave map for
>>> a device that does not have a request line. However, it also seems
>>> that the entire code in those two drivers that deals with DMA is specific
>>> to PXA anyway, so maybe it can be done differently: instead of
>>> calling dma_request_slave_channel_compat() or dma_request_chan()
>>> with a fake request line, how about calling dma_request_channel()
>>> with an NULL filter function and data, and have the driver handle
>>> the empty data case the same way as the rq=-1 case today?
>> Okay, in this case :
>>  - the channel priority cannot be passed anymore
>
> Right, but it could just always use a static priority, right?
Yes, an implicit default priority. I'm not a big fan of implicit parameters, yet
I can do it.

>>  - and I don't see how this can work :
>>    dma_request_channel()
>>      __dma_request_channel()
>>        find_candidate()
>>          private_candidate(mask, device, fn, fn_param);
>>            /* Here, fn == NULL and fn_param == NULL as per your proposal */
>>
>>    This function will find the first available dma channel, all right, but
>>    no function will be called in pxa_dma driver, and therefore the last
>>    requestor of the channel will be used, which is bad.
>
> Can't you just reset those in pxad_free_chan_resources()?
I can, let's see what happens next ...

Cheers.

             reply	other threads:[~2018-04-04 19:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-04 19:21 Robert Jarzmik [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-04-04 10:18 [02/15] ARM: pxa: add dma slave map Arnd Bergmann
2018-04-03 20:19 Robert Jarzmik
2018-04-03 15:39 Arnd Bergmann
2018-04-03 15:18 Robert Jarzmik
2018-04-03  6:51 Arnd Bergmann
2018-04-02 14:26 Robert Jarzmik

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=87d0ze4w18.fsf@belgarion.home \
    --to=robert.jarzmik@free.fr \
    --cc=arnd@arndb.de \
    --cc=daniel@zonque.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=haojian.zhuang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox