Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1409228

Re: [PATCH 5/5] RFC spi: sun4i: add DMA support

From Michal Suchanek <hramrach@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 5/5] RFC spi: sun4i: add DMA support
Date 2016-05-30 17:30 +0200
Message-ID <rExiF-5ZF-7@gated-at.bofh.it> (permalink)
References <rDfnP-5MI-3@gated-at.bofh.it> <rEtyq-3wi-21@gated-at.bofh.it> <rEtyq-3wi-19@gated-at.bofh.it> <rEukN-44d-1@gated-at.bofh.it> <rEwZk-5PN-41@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello,

On 30 May 2016 at 17:03, Mark Brown <broonie@kernel.org> wrote:
> On Mon, May 30, 2016 at 02:11:51PM +0200, Geert Uytterhoeven wrote:
>> On Mon, May 30, 2016 at 1:26 PM, Mark Brown <broonie@kernel.org> wrote:
>> > On Thu, May 26, 2016 at 07:25:25PM -0000, Michal Suchanek wrote:
>> >>  - fallback to previous behaviour when DMA initialization fails
>> >>
>> >>    + this has the problem that when the driver happens to load before the dma
>> >>      driver it will not use dma - can be addressed with a module parameter
>
>> > No, you should pay attention to the error you are getting and let probe
>> > deferral happen if that's the error you get.
>
>> Unfortunately DMA is an optional feature.
>
>> There's no way to distinguish between -EPROBE_DEFER due to the SPI master
>> driver being probed before the DMA engine driver, and -EPROBE_DEFER due to
>> support for the DMA engine not having been compiled in.
>
> I really don't think it's worth caring too much about cases where the
> DMA driver hasn't been compiled in, it's not like SPI is the only thing
> that's going to be using it.  I really think it's better to defer the
> problem - not getting DMA (or worse, only getting DMA on some boots) is
> not great and if people are optimising on that level my feeling is that
> they're probably going to be OK with customizing DT to match.  Ideally
> we would have something a bit nicer than deferred probe but right now
> this seems the more helpful option.

It's what the driver did to start with and it was requested to fall
back to non-DMA in the case DMA is not available.

We get to the much discussed problem that it's never possible to tell
if a driver is available or not.

It's possible to add a parameter like require_dma which could be used
to load the driver without dma if unset. If it was set by default then
driver ordering is not important so long as dma driver is loaded
eventually. Also an informative print that such parameter exists when
probing the driver is deferred would be helpful. It would probably
create quite a bit of log spam, however. The driver can be deferred
several times during boot.

Thanks

Michal

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 5/5] RFC spi: sun4i: add DMA support Mark Brown <broonie@kernel.org> - 2016-05-30 13:30 +0200
  Re: [PATCH 5/5] RFC spi: sun4i: add DMA support Geert Uytterhoeven <geert@linux-m68k.org> - 2016-05-30 14:20 +0200
    Re: [PATCH 5/5] RFC spi: sun4i: add DMA support Mark Brown <broonie@kernel.org> - 2016-05-30 17:10 +0200
      Re: [PATCH 5/5] RFC spi: sun4i: add DMA support Michal Suchanek <hramrach@gmail.com> - 2016-05-30 17:30 +0200
        Re: [PATCH 5/5] RFC spi: sun4i: add DMA support Mark Brown <broonie@kernel.org> - 2016-05-30 18:00 +0200

csiph-web