[PATCH v2 0/2] Chunk splitting of spi transfers
Noralf Trønnes
noralf at tronnes.org
Tue Feb 27 09:40:53 PST 2018
Den 25.02.2018 14.19, skrev Lukas Wunner:
> [cc += linux-rpi-kernel at lists.infradead.org]
>
> On Sat, Feb 24, 2018 at 06:15:59PM +0000, Meghana Madhyastha wrote:
>> I've added bcm2835_spi_transfer_one_message in spi-bcm2835. This calls
>> spi_split_transfers_maxsize to split large chunks for spi dma transfers.
>> I then removed chunk splitting in the tinydrm spi helper (as now the core
>> is handling the chunk splitting). However, although the SPI HW should be
>> able to accomodate up to 65535 bytes for dma transfers, the splitting of
>> chunks to 65535 bytes results in a dma transfer time out error. However,
>> when the chunks are split to < 64 bytes it seems to work fine.
> Hm, that is really odd, how did you test this exactly, what did you
> use as SPI slave? It contradicts our own experience, we're using
> Micrel KSZ8851 Ethernet chips as SPI slave on spi0 of a BCM2837
> and can send/receive messages via DMA to the tune of several hundred
> bytes without any issues. In fact, for messages < 96 bytes, DMA is
> not used at all, so you've probably been using interrupt mode,
> see the BCM2835_SPI_DMA_MIN_LENGTH macro in spi-bcm2835.c.
Meghana,
I suggest using modetest with page flipping to check that you don't
regress performance wise:
$ ./libdrm/tests/modetest/modetest -M mi0283qt -s 28:320x240 at RG16 -v
setting mode 320x240-0Hz at RG16 on connectors 28, crtc 30
freq: 29.88Hz
freq: 29.96Hz
freq: 29.99Hz
^C
Noralf.
More information about the linux-rpi-kernel
mailing list