All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: linux-arm-kernel@lists.infradead.org,
	"Sam Ravnborg" <sam@ravnborg.org>,
	"Mark Brown" <broonie@kernel.org>,
	"Haojian Zhuang" <haojian.zhuang@gmail.com>,
	linux-spi@vger.kernel.org, "Noralf Trønnes" <noralf@tronnes.org>,
	"DRI Development" <dri-devel@lists.freedesktop.org>,
	"Robert Jarzmik" <robert.jarzmik@free.fr>,
	"Daniel Mack" <daniel@zonque.org>
Subject: Re: [PATCH] spi: pxa2xx: Set controller->max_transfer_size in dma mode
Date: Mon, 21 Oct 2019 14:08:57 +0300	[thread overview]
Message-ID: <20191021110857.GR32742@smile.fi.intel.com> (raw)
In-Reply-To: <20191017070638.GB32742@smile.fi.intel.com>

On Thu, Oct 17, 2019 at 10:06:38AM +0300, Andy Shevchenko wrote:
> On Thu, Oct 17, 2019 at 08:44:26AM +0200, Daniel Vetter wrote:
> > In DMA mode we have a maximum transfer size, past that the driver
> > falls back to PIO (see the check at the top of pxa2xx_spi_transfer_one).
> > Falling back to PIO for big transfers defeats the point of a dma engine,
> > hence set the max transfer size to inform spi clients that they need
> > to do something smarter.
> > 
> > This was uncovered by the drm_mipi_dbi spi panel code, which does
> > large spi transfers, but stopped splitting them after:
> > 
> > commit e143364b4c1774f68e923a5a0bb0fca28ac25888
> > Author: Noralf Trønnes <noralf@tronnes.org>
> > Date:   Fri Jul 19 17:59:10 2019 +0200
> > 
> >     drm/tinydrm: Remove tinydrm_spi_max_transfer_size()
> > 
> > After this commit the code relied on the spi core to split transfers
> > into max dma-able blocks, which also papered over the PIO fallback issue.
> > 
> > Fix this by setting the overall max transfer size to the DMA limit,
> > but only when the controller runs in DMA mode.
> > 
> 
> Thank you, Daniel!

Mark, can be this applied?

-- 
With Best Regards,
Andy Shevchenko

WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: linux-arm-kernel@lists.infradead.org,
	"Sam Ravnborg" <sam@ravnborg.org>,
	"Mark Brown" <broonie@kernel.org>,
	"Haojian Zhuang" <haojian.zhuang@gmail.com>,
	linux-spi@vger.kernel.org, "Noralf Trønnes" <noralf@tronnes.org>,
	"DRI Development" <dri-devel@lists.freedesktop.org>,
	"Robert Jarzmik" <robert.jarzmik@free.fr>,
	"Daniel Mack" <daniel@zonque.org>
Subject: Re: [PATCH] spi: pxa2xx: Set controller->max_transfer_size in dma mode
Date: Mon, 21 Oct 2019 14:08:57 +0300	[thread overview]
Message-ID: <20191021110857.GR32742@smile.fi.intel.com> (raw)
In-Reply-To: <20191017070638.GB32742@smile.fi.intel.com>

On Thu, Oct 17, 2019 at 10:06:38AM +0300, Andy Shevchenko wrote:
> On Thu, Oct 17, 2019 at 08:44:26AM +0200, Daniel Vetter wrote:
> > In DMA mode we have a maximum transfer size, past that the driver
> > falls back to PIO (see the check at the top of pxa2xx_spi_transfer_one).
> > Falling back to PIO for big transfers defeats the point of a dma engine,
> > hence set the max transfer size to inform spi clients that they need
> > to do something smarter.
> > 
> > This was uncovered by the drm_mipi_dbi spi panel code, which does
> > large spi transfers, but stopped splitting them after:
> > 
> > commit e143364b4c1774f68e923a5a0bb0fca28ac25888
> > Author: Noralf Trønnes <noralf@tronnes.org>
> > Date:   Fri Jul 19 17:59:10 2019 +0200
> > 
> >     drm/tinydrm: Remove tinydrm_spi_max_transfer_size()
> > 
> > After this commit the code relied on the spi core to split transfers
> > into max dma-able blocks, which also papered over the PIO fallback issue.
> > 
> > Fix this by setting the overall max transfer size to the DMA limit,
> > but only when the controller runs in DMA mode.
> > 
> 
> Thank you, Daniel!

Mark, can be this applied?

-- 
With Best Regards,
Andy Shevchenko



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-10-21 11:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16 19:57 [PATCH] spi: pxa2xx: Set controller->max_transfer_size in dma mode Daniel Vetter
2019-10-16 19:57 ` Daniel Vetter
2019-10-16 21:30 ` Noralf Trønnes
2019-10-16 21:30   ` Noralf Trønnes
2019-10-16 21:49   ` Mark Brown
2019-10-16 21:49     ` Mark Brown
2019-10-17  6:44 ` Daniel Vetter
2019-10-17  7:06   ` Andy Shevchenko
2019-10-17  7:06     ` Andy Shevchenko
2019-10-21 11:08     ` Andy Shevchenko [this message]
2019-10-21 11:08       ` Andy Shevchenko
2019-10-21 11:35       ` Mark Brown
2019-10-21 11:35         ` 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=20191021110857.GR32742@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=broonie@kernel.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel@zonque.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=haojian.zhuang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=noralf@tronnes.org \
    --cc=robert.jarzmik@free.fr \
    --cc=sam@ravnborg.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 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.