linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Michal Suchanek <hramrach@gmail.com>
Cc: "Mark Brown" <broonie@kernel.org>, "Priit Laes" <plaes@plaes.org>,
	"Chen-Yu Tsai" <wens@csie.org>,
	linux-spi <linux-spi@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Emilio López" <emilio@elopez.com.ar>
Subject: Re: [PATCH 1/2] spi: sun4i: add DMA support
Date: Fri, 18 Mar 2016 21:23:10 +0100	[thread overview]
Message-ID: <20160318202310.GS30977@lukather> (raw)
In-Reply-To: <CAOMqctSoA5WxtBCUK0PoHTV9OBi_fw4mdqOw+Dc_1DB_jghqng@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2045 bytes --]

On Thu, Mar 17, 2016 at 12:54:08PM +0100, Michal Suchanek wrote:
> On 17 March 2016 at 12:43, Mark Brown <broonie@kernel.org> wrote:
> > On Thu, Mar 17, 2016 at 11:58:05AM +0100, Michal Suchanek wrote:
> >> On 17 March 2016 at 08:27, Maxime Ripard
> >
> >> > You're mixing two things up: the fact that we can't do more than the
> >> > FIFO length in PIO and that we're missing DMA support. We have patches
> >> > to address both, and there's no depedency between the two.
> >
> >> The only thing is that although DMA is optional on pretty much any
> >> system you will have DMA available unless you broke your config. You
> >> really do want the DMA support when it is available. So there will be
> >> nobody testing the non-DMA part and it will be prone to bitrot.
> >
> > Well, it might be worth doing PIO for very short transfers even if you
> > have DMA - it's quite common for this to perform better.
> 
> That's what the driver does. The discussion revolves around the fact
> that the driver does not attempt to work (even for very short
> transfers) when the DMA channels are not configured and just bails
> out. AFAICT the channels are always available when the system is
> properly configured and the dmaengine driver loaded.

I guess we just don't have the same defininition of "proper".

Let's take an opposite view. Can you have SPI working now if the
DMAEngine framework is not there? Yes. Why should it change? And even
more so, why should it change silently?

> Very few device drivers would work with 63byte transfers only and the
> code for manually driving the CS line in case the DMA engine fails to
> configure will necessarily go untested most of the time since most
> systems will have DMA configured properly.

That's not true. A significant portion would work. I don't like to
make up numbers, but I guess only the EEPROMs and rather big screens
wouldn't work.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-03-18 20:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26  5:56 [PATCH RESEND 0/2] spi: sun4i: add DMA support Priit Laes
2016-02-26  5:56 ` [PATCH 1/2] " Priit Laes
     [not found]   ` <1456466217-6793-2-git-send-email-plaes-q/aMd4JkU83YtjvyW6yDsg@public.gmane.org>
2016-02-26 12:25     ` Mark Brown
     [not found]       ` <20160226122504.GR18327-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-02-26 12:51         ` Michal Suchanek
     [not found]           ` <CAOMqctTz=szSkpk95D_dUJjjpziCKoPv=xRczjfq2Roct-K-OA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-06 21:42             ` Maxime Ripard
2016-03-10  9:01               ` Michal Suchanek
     [not found]                 ` <CAOMqctQ5aq0A95ErVVF13f_8JBy0xRw9_FZ3avbYmZUGXp=Svg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-17  7:27                   ` Maxime Ripard
2016-03-17 10:58                     ` Michal Suchanek
     [not found]                       ` <CAOMqctQzMhR_bf=rMyROcTAPcrgx2EBqhH+qJL=b-U=iG9ZF4Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-17 11:43                         ` Mark Brown
     [not found]                           ` <20160317114308.GF2566-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-03-17 11:54                             ` Michal Suchanek
     [not found]                               ` <CAOMqctSoA5WxtBCUK0PoHTV9OBi_fw4mdqOw+Dc_1DB_jghqng-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-17 11:58                                 ` Mark Brown
2016-03-18 20:23                               ` Maxime Ripard [this message]
2016-03-18 20:33                                 ` Mark Brown
     [not found] ` <1456466217-6793-1-git-send-email-plaes-q/aMd4JkU83YtjvyW6yDsg@public.gmane.org>
2016-02-26  5:56   ` [PATCH 2/2] ARM: sunxi: spi: add notice about SPI FIFO limit Priit Laes
     [not found]     ` <1456466217-6793-3-git-send-email-plaes-q/aMd4JkU83YtjvyW6yDsg@public.gmane.org>
2016-03-06 18:12       ` Maxime Ripard
2016-02-26 12:15   ` [PATCH RESEND 0/2] spi: sun4i: add DMA support Mark Brown

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=20160318202310.GS30977@lukather \
    --to=maxime.ripard@free-electrons.com \
    --cc=broonie@kernel.org \
    --cc=emilio@elopez.com.ar \
    --cc=hramrach@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=plaes@plaes.org \
    --cc=wens@csie.org \
    /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;
as well as URLs for NNTP newsgroup(s).