Re: [PATCH] spi: imx: add module parameter to control DMA use

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 04, 2019 at 11:02:36PM +0000, Trent Piepho wrote:
> Add the boolean module parameter "use_dma" to control the use of DMA by
> the driver.  There are about two dozen other drivers with a "use_dma"
> parameter of some sort.
> 
> DMA may allow faster and more efficient transfers than using PIO, but it
> also adds overhead for small transfers.
> 
> High speed receive operations may be less likely to have issues with
> FIFO overflow when using DMA than when using PIO.
> 
> The eCSPI appears to insert a 4 bit pause after each word in DMA mode,
> not done in PIO mode, which can make DMA transfers 50% slower than PIO.
> 
> In some cases DMA may be a net win while in others PIO might be.  It
> depends on the application.  So allow DMA to be enabled or disabled at
> the driver level.  The default will be to have it enabled when possible.
> 
> Signed-off-by: Trent Piepho <tpiepho@xxxxxxxxxx>

Wouldn't it be more sensible to change the driver to only use DMA for
big transfers? That would look much more reasonable than a global
parameter that affects all transfers on all spi interfaces. The spi-mxs
driver does something like that. (In mxs_spi_transfer_one look for "if
(t->len < 32) {".)

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux