Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1408994 > unrolled thread
| Started by | Mark Brown <broonie@kernel.org> |
|---|---|
| First post | 2016-05-30 13:30 +0200 |
| Last post | 2016-06-06 13:40 +0200 |
| Articles | 16 — 5 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
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
Re: [PATCH 5/5] RFC spi: sun4i: add DMA support Michal Suchanek <hramrach@gmail.com> - 2016-05-31 12:50 +0200
Re: [PATCH 5/5] RFC spi: sun4i: add DMA support Mark Brown <broonie@kernel.org> - 2016-05-31 15:30 +0200
Re: [PATCH 5/5] RFC spi: sun4i: add DMA support Michal Suchanek <hramrach@gmail.com> - 2016-05-31 16:30 +0200
Re: [PATCH 5/5] RFC spi: sun4i: add DMA support Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-06-02 10:20 +0200
Re: [PATCH 5/5] RFC spi: sun4i: add DMA support Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-06-01 20:10 +0200
Re: [linux-sunxi] Re: [PATCH 5/5] RFC spi: sun4i: add DMA support Priit Laes <plaes@plaes.org> - 2016-06-02 06:50 +0200
Re: [linux-sunxi] Re: [PATCH 5/5] RFC spi: sun4i: add DMA support Mark Brown <broonie@kernel.org> - 2016-06-02 11:20 +0200
Re: [linux-sunxi] Re: [PATCH 5/5] RFC spi: sun4i: add DMA support Michal Suchanek <hramrach@gmail.com> - 2016-06-02 14:20 +0200
Re: [linux-sunxi] Re: [PATCH 5/5] RFC spi: sun4i: add DMA support Mark Brown <broonie@kernel.org> - 2016-06-02 16:30 +0200
Re: [linux-sunxi] Re: [PATCH 5/5] RFC spi: sun4i: add DMA support Michal Suchanek <hramrach@gmail.com> - 2016-06-05 13:30 +0200
Re: [linux-sunxi] Re: [PATCH 5/5] RFC spi: sun4i: add DMA support Mark Brown <broonie@kernel.org> - 2016-06-06 13:40 +0200
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2016-05-30 13:30 +0200 |
| Subject | Re: [PATCH 5/5] RFC spi: sun4i: add DMA support |
| Message-ID | <rEtyq-3wi-19@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
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.
[toc] | [next] | [standalone]
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| Date | 2016-05-30 14:20 +0200 |
| Message-ID | <rEukN-44d-1@gated-at.bofh.it> |
| In reply to | #1408994 |
Hi Mark,
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.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
[toc] | [prev] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2016-05-30 17:10 +0200 |
| Message-ID | <rEwZk-5PN-41@gated-at.bofh.it> |
| In reply to | #1409037 |
[Multipart message — attachments visible in raw view] — view raw
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.
[toc] | [prev] | [next] | [standalone]
| From | Michal Suchanek <hramrach@gmail.com> |
|---|---|
| Date | 2016-05-30 17:30 +0200 |
| Message-ID | <rExiF-5ZF-7@gated-at.bofh.it> |
| In reply to | #1409205 |
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
[toc] | [prev] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2016-05-30 18:00 +0200 |
| Message-ID | <rExLI-6b9-11@gated-at.bofh.it> |
| In reply to | #1409228 |
[Multipart message — attachments visible in raw view] — view raw
On Mon, May 30, 2016 at 05:28:10PM +0200, Michal Suchanek wrote: > On 30 May 2016 at 17:03, Mark Brown <broonie@kernel.org> wrote: > > 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 > 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. Why? I really can't see any sensible use case for this that doesn't have a better solution available. > 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. That seems fairly hacky, if we were going to do anything like that it should be the other way around so that we default to trying to use resources and even then it seems like something that should be handled at a framework level rather than having random options in individual drivers to ignore things. Having things behave inconsistently between different drivers is going to lead to a worse user experience and if this is a good idea for one driver it seems like it'd be a good idea for all of them. But really
[toc] | [prev] | [next] | [standalone]
| From | Michal Suchanek <hramrach@gmail.com> |
|---|---|
| Date | 2016-05-31 12:50 +0200 |
| Message-ID | <rEPpg-1AT-17@gated-at.bofh.it> |
| In reply to | #1409248 |
On 30 May 2016 at 17:50, Mark Brown <broonie@kernel.org> wrote: > On Mon, May 30, 2016 at 05:28:10PM +0200, Michal Suchanek wrote: >> On 30 May 2016 at 17:03, Mark Brown <broonie@kernel.org> wrote: > >> > 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 > >> 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. > > Why? I really can't see any sensible use case for this that doesn't > have a better solution available. Of course, the solution is to compile in the DMA driver. It's been argued that some drivers which use only short transfers will just work. > >> 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. > > That seems fairly hacky, if we were going to do anything like that it > should be the other way around so that we default to trying to use > resources and even then it seems like something that should be handled > at a framework level rather than having random options in individual > drivers to ignore things. Having things behave inconsistently between > different drivers is going to lead to a worse user experience and if > this is a good idea for one driver it seems like it'd be a good idea for > all of them. Hacky but doable if desirable. It's awesome for testing SPI transfer fragmentation with different drivers ;-) The previous discussion of this driver is here http://thread.gmane.org/gmane.linux.kernel/2162327 Thanks Michal
[toc] | [prev] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2016-05-31 15:30 +0200 |
| Message-ID | <rERU6-3h1-23@gated-at.bofh.it> |
| In reply to | #1410134 |
[Multipart message — attachments visible in raw view] — view raw
On Tue, May 31, 2016 at 12:44:54PM +0200, Michal Suchanek wrote: > On 30 May 2016 at 17:50, Mark Brown <broonie@kernel.org> wrote: > > On Mon, May 30, 2016 at 05:28:10PM +0200, Michal Suchanek wrote: > >> 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. > > Why? I really can't see any sensible use case for this that doesn't > > have a better solution available. > Of course, the solution is to compile in the DMA driver. > It's been argued that some drivers which use only short transfers will > just work. With nothing else in the system that needs DMA? It's making the performance of the system less reliable for the benefit of a very narrow use case.
[toc] | [prev] | [next] | [standalone]
| From | Michal Suchanek <hramrach@gmail.com> |
|---|---|
| Date | 2016-05-31 16:30 +0200 |
| Message-ID | <rESQ9-3QA-9@gated-at.bofh.it> |
| In reply to | #1410309 |
On 31 May 2016 at 15:27, Mark Brown <broonie@kernel.org> wrote: > On Tue, May 31, 2016 at 12:44:54PM +0200, Michal Suchanek wrote: >> On 30 May 2016 at 17:50, Mark Brown <broonie@kernel.org> wrote: >> > On Mon, May 30, 2016 at 05:28:10PM +0200, Michal Suchanek wrote: > >> >> 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. > >> > Why? I really can't see any sensible use case for this that doesn't >> > have a better solution available. > >> Of course, the solution is to compile in the DMA driver. > >> It's been argued that some drivers which use only short transfers will >> just work. > > With nothing else in the system that needs DMA? It's making the > performance of the system less reliable for the benefit of a very narrow > use case. Some of the platform devices have dedicated DMA *controller* built into the device IP so the DMA engine really is optional on many sunxi devices. Besides SPI you definitely need the DMA engine for audio. You probably don't need it for storage and graphics. I don't have any idea if it's used for USB and Ethernet. Thanks Michal
[toc] | [prev] | [next] | [standalone]
| From | Maxime Ripard <maxime.ripard@free-electrons.com> |
|---|---|
| Date | 2016-06-02 10:20 +0200 |
| Message-ID | <rFw1b-3rP-1@gated-at.bofh.it> |
| In reply to | #1410346 |
[Multipart message — attachments visible in raw view] — view raw
On Tue, May 31, 2016 at 04:19:28PM +0200, Michal Suchanek wrote: > On 31 May 2016 at 15:27, Mark Brown <broonie@kernel.org> wrote: > > On Tue, May 31, 2016 at 12:44:54PM +0200, Michal Suchanek wrote: > >> On 30 May 2016 at 17:50, Mark Brown <broonie@kernel.org> wrote: > >> > On Mon, May 30, 2016 at 05:28:10PM +0200, Michal Suchanek wrote: > > > >> >> 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. > > > >> > Why? I really can't see any sensible use case for this that doesn't > >> > have a better solution available. > > > >> Of course, the solution is to compile in the DMA driver. > > > >> It's been argued that some drivers which use only short transfers will > >> just work. > > > > With nothing else in the system that needs DMA? It's making the > > performance of the system less reliable for the benefit of a very narrow > > use case. > > Some of the platform devices have dedicated DMA *controller* built > into the device IP so the DMA engine really is optional on many sunxi > devices. Besides SPI you definitely need the DMA engine for audio. You > probably don't need it for storage and graphics. I don't have any idea > if it's used for USB and Ethernet. USB and Ethernet have their own dedicated DMA engines. So currently, the only driver that requires it is the audio codec. Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
[toc] | [prev] | [next] | [standalone]
| From | Maxime Ripard <maxime.ripard@free-electrons.com> |
|---|---|
| Date | 2016-06-01 20:10 +0200 |
| Message-ID | <rFiKB-3t1-7@gated-at.bofh.it> |
| In reply to | #1409248 |
[Multipart message — attachments visible in raw view] — view raw
Hi, On Mon, May 30, 2016 at 04:50:16PM +0100, Mark Brown wrote: > On Mon, May 30, 2016 at 05:28:10PM +0200, Michal Suchanek wrote: > > On 30 May 2016 at 17:03, Mark Brown <broonie@kernel.org> wrote: > > > > 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 > > > 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. > > Why? I really can't see any sensible use case for this that doesn't > have a better solution available. SPI works just fine without DMA, which might just be considered an (optional) optimisation. We've been using it without DMA for years now, and it was working just fine, and it will work even better with the other patches in this serie. There's no reason to add a hard dependency on something that we don't really need. Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
[toc] | [prev] | [next] | [standalone]
| From | Priit Laes <plaes@plaes.org> |
|---|---|
| Date | 2016-06-02 06:50 +0200 |
| Subject | Re: [linux-sunxi] Re: [PATCH 5/5] RFC spi: sun4i: add DMA support |
| Message-ID | <rFsJX-1jX-5@gated-at.bofh.it> |
| In reply to | #1411443 |
On Wed, 2016-06-01 at 20:00 +0200, Maxime Ripard wrote: > Hi, > > On Mon, May 30, 2016 at 04:50:16PM +0100, Mark Brown wrote: > > > > On Mon, May 30, 2016 at 05:28:10PM +0200, Michal Suchanek wrote: > > > > > > On 30 May 2016 at 17:03, Mark Brown <broonie@kernel.org> wrote: > > > > > > > > > > > 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 > > > > > > 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. > > Why? I really can't see any sensible use case for this that > > doesn't > > have a better solution available. > SPI works just fine without DMA, which might just be considered an > (optional) optimisation. > > We've been using it without DMA for years now, and it was working > just > fine, and it will work even better with the other patches in this > serie. There's no reason to add a hard dependency on something that > we > don't really need. > Actually it non-DMA case works fine if you don't need SPI transfers larger than SUN4I_FIFO_DEPTH - 1, which is 63 bytes. This was addressed by this patch, but was never applied: http://permalink.gmane.org/gmane.linux.kernel.spi.devel/18950
[toc] | [prev] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2016-06-02 11:20 +0200 |
| Subject | Re: [linux-sunxi] Re: [PATCH 5/5] RFC spi: sun4i: add DMA support |
| Message-ID | <rFwXf-450-1@gated-at.bofh.it> |
| In reply to | #1411820 |
[Multipart message — attachments visible in raw view] — view raw
On Thu, Jun 02, 2016 at 07:42:26AM +0300, Priit Laes wrote: > This was addressed by this patch, but was never applied: > http://permalink.gmane.org/gmane.linux.kernel.spi.devel/18950 I've never seen that patch before, if it was CCed to me there's a good chance it'd have been deleted unread because you put ARM: at the start of the subject line which says it's a patch for arch/arm. You'll need to resubmit.
[toc] | [prev] | [next] | [standalone]
| From | Michal Suchanek <hramrach@gmail.com> |
|---|---|
| Date | 2016-06-02 14:20 +0200 |
| Subject | Re: [linux-sunxi] Re: [PATCH 5/5] RFC spi: sun4i: add DMA support |
| Message-ID | <rFzLr-5Px-1@gated-at.bofh.it> |
| In reply to | #1411820 |
On 2 June 2016 at 06:42, Priit Laes <plaes@plaes.org> wrote: > On Wed, 2016-06-01 at 20:00 +0200, Maxime Ripard wrote: >> Hi, >> >> On Mon, May 30, 2016 at 04:50:16PM +0100, Mark Brown wrote: >> > >> > On Mon, May 30, 2016 at 05:28:10PM +0200, Michal Suchanek wrote: >> > > >> > > On 30 May 2016 at 17:03, Mark Brown <broonie@kernel.org> wrote: >> > > >> > > > >> > > > 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 >> > > >> > > 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. >> > Why? I really can't see any sensible use case for this that >> > doesn't >> > have a better solution available. >> SPI works just fine without DMA, which might just be considered an >> (optional) optimisation. >> >> We've been using it without DMA for years now, and it was working >> just >> fine, and it will work even better with the other patches in this >> serie. There's no reason to add a hard dependency on something that >> we >> don't really need. >> > > Actually it non-DMA case works fine if you don't need SPI transfers > larger than SUN4I_FIFO_DEPTH - 1, which is 63 bytes. > > This was addressed by this patch, but was never applied: > http://permalink.gmane.org/gmane.linux.kernel.spi.devel/18950 And the code added in that patch will never run unless you 1) use long spi transfers 2) compile in/load SPI without DMA support There is no reason for doing 2) since we have do DMA support for sunxi. So that's another code path that needs maintenance and testing and likely will not get it. Thanks Michal
[toc] | [prev] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2016-06-02 16:30 +0200 |
| Subject | Re: [linux-sunxi] Re: [PATCH 5/5] RFC spi: sun4i: add DMA support |
| Message-ID | <rFBNf-71V-21@gated-at.bofh.it> |
| In reply to | #1412176 |
[Multipart message — attachments visible in raw view] — view raw
On Thu, Jun 02, 2016 at 02:14:26PM +0200, Michal Suchanek wrote: > On 2 June 2016 at 06:42, Priit Laes <plaes@plaes.org> wrote: > > On Wed, 2016-06-01 at 20:00 +0200, Maxime Ripard wrote: > > Actually it non-DMA case works fine if you don't need SPI transfers > > larger than SUN4I_FIFO_DEPTH - 1, which is 63 bytes. > > This was addressed by this patch, but was never applied: > > http://permalink.gmane.org/gmane.linux.kernel.spi.devel/18950 > And the code added in that patch will never run unless you > 1) use long spi transfers > 2) compile in/load SPI without DMA support > There is no reason for doing 2) since we have do DMA support for sunxi. Well, presumably such code exists and is being worked on? > So that's another code path that needs maintenance and testing and > likely will not get it. Oh, come on. You might not want to use it yourself but the chances are that someone will want to use it just like the situation with all the other SPI drivers. It's a perfectly reasonable and sensible feature to support upstream. I really do not understand why there is such a strong desire to have these devices be a special snowflake here, the worst that's likely to happen here is that you're going to end up having to either remove the DMA controller from the DT or load the driver for it neither of which seem like the end of the world.
[toc] | [prev] | [next] | [standalone]
| From | Michal Suchanek <hramrach@gmail.com> |
|---|---|
| Date | 2016-06-05 13:30 +0200 |
| Subject | Re: [linux-sunxi] Re: [PATCH 5/5] RFC spi: sun4i: add DMA support |
| Message-ID | <rGEpI-6bB-3@gated-at.bofh.it> |
| In reply to | #1412285 |
On 2 June 2016 at 16:26, Mark Brown <broonie@kernel.org> wrote: > On Thu, Jun 02, 2016 at 02:14:26PM +0200, Michal Suchanek wrote: >> On 2 June 2016 at 06:42, Priit Laes <plaes@plaes.org> wrote: >> > On Wed, 2016-06-01 at 20:00 +0200, Maxime Ripard wrote: > >> > Actually it non-DMA case works fine if you don't need SPI transfers >> > larger than SUN4I_FIFO_DEPTH - 1, which is 63 bytes. > >> > This was addressed by this patch, but was never applied: >> > http://permalink.gmane.org/gmane.linux.kernel.spi.devel/18950 > >> And the code added in that patch will never run unless you > >> 1) use long spi transfers >> 2) compile in/load SPI without DMA support > >> There is no reason for doing 2) since we have do DMA support for sunxi. > > Well, presumably such code exists and is being worked on? Which code are you referring to? This is a reply to patch which adds DMA support to the SPI driver so that it can work for arbitrarily long transfers. So there is code for fully working driver. > >> So that's another code path that needs maintenance and testing and >> likely will not get it. > > Oh, come on. You might not want to use it yourself but the chances are > that someone will want to use it just like the situation with all the > other SPI drivers. It's a perfectly reasonable and sensible feature to > support upstream. Is it? Once we have *one* driver that works for arbitrarily long transfers and it works out of the box with the board defconfig 99% of people who will use the SPI driver for anything will use this driver. Any other variant will go untested. And for the driver to also work without DMA you have to *tell* it to probe without DMA because it cannot know you are not going to load a DMA driver later. > > I really do not understand why there is such a strong desire to have > these devices be a special snowflake here, the worst that's likely to > happen here is that you're going to end up having to either remove the > DMA controller from the DT or load the driver for it neither of which > seem like the end of the world. Why would you do that? Thanks Michal
[toc] | [prev] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2016-06-06 13:40 +0200 |
| Subject | Re: [linux-sunxi] Re: [PATCH 5/5] RFC spi: sun4i: add DMA support |
| Message-ID | <rH12W-4it-11@gated-at.bofh.it> |
| In reply to | #1414107 |
[Multipart message — attachments visible in raw view] — view raw
On Sun, Jun 05, 2016 at 01:27:11PM +0200, Michal Suchanek wrote: > On 2 June 2016 at 16:26, Mark Brown <broonie@kernel.org> wrote: > > On Thu, Jun 02, 2016 at 02:14:26PM +0200, Michal Suchanek wrote: > >> And the code added in that patch will never run unless you > >> 1) use long spi transfers > >> 2) compile in/load SPI without DMA support > >> There is no reason for doing 2) since we have do DMA support for sunxi. > > Well, presumably such code exists and is being worked on? > Which code are you referring to? > This is a reply to patch which adds DMA support to the SPI driver so > that it can work for arbitrarily long transfers. It sounded like there might be a missing DMA driver? Though I think I was misreading the above. > > Oh, come on. You might not want to use it yourself but the chances are > > that someone will want to use it just like the situation with all the > > other SPI drivers. It's a perfectly reasonable and sensible feature to > > support upstream. > Is it? > Once we have *one* driver that works for arbitrarily long transfers > and it works out of the box with the board defconfig 99% of people who > will use the SPI driver for anything will use this driver. Any other > variant will go untested. We don't want multiple drivers for this and general maintainability reasons, I'm not sure where the idea that we might want multiple drivers came from? > And for the driver to also work without DMA you have to *tell* it to > probe without DMA because it cannot know you are not going to load a > DMA driver later. Yes. This puts the cost on the special snowflake systems that absolutely cannot have any DMA support in their systems for some reason while keeping the driver featureful by default, and keeps that cost fairly small. > > I really do not understand why there is such a strong desire to have > > these devices be a special snowflake here, the worst that's likely to > > happen here is that you're going to end up having to either remove the > > DMA controller from the DT or load the driver for it neither of which > > seem like the end of the world. > Why would you do that? Like I say I really don't understand why this is. I'm just saying there are ways to do this fairly simply if people really want it on their systems.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web