From: maxime.ripard@bootlin.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: sun6i SPI driver issue
Date: Tue, 27 Mar 2018 09:47:40 +0200 [thread overview]
Message-ID: <20180327074740.epkhjsu3bqhgk32d@flea> (raw)
In-Reply-To: <1aab0d1b-cdd4-cdbc-0242-af5d180e581b@orpaltech.com>
Hi,
Please don't reply in HTML.
On Mon, Mar 26, 2018 at 02:57:27PM +0300, Sergey Suloev wrote:
> On 03/26/2018 02:45 PM, Maxime Ripard wrote:
>
> On Mon, Mar 19, 2018 at 06:43:43PM +0300, Sergey Suloev wrote:
>
> I have recently found a critical issue with sun6i SPI driver. It actually
> found it long time ago while using spidev but I didn't considered it as
> something important. Now it seems like a blocking issue that prevents using
> the driver in any serious application.
>
> So is it "critical" or "not important"?
>
>
> I have created a DRM driver for a ili9488-based display, its source is
> available here [1] and device tree overlay [2]. The driver has been
> successfully verified on RPi3, but? it is failing on sunxi: the driver gets
> loaded, display seems working but SPI transfers are periodically failing
> with error -110 (timeout). Due to the issue the picture is frozen and
> completely refreshed again from time to time.
>
> On which kernel version was this tested?
>
> Do you have any additional details on what exactly is happening?
>
> Is it timeouting because you never received any interrupts? Is the
> first part of your transfer (the one that would fit in the FIFO
> actually done, and it's the second part that fails? Something else?
>
> the issue is related to wrong PIO algorithm in sun6i SPI driver: the transfer
> length must be <= FIFO length in PIO mode, i.e. the current implementation is
> 100% broken.
Right, but you still don't give any detail on what "the issue" is
exactly, so it's kind of difficult to try to come up with a fix for
it.
> I put the restriction? above and tested with BPi M2 with ili9488
> slave - it works perfectly.
The current code has:
https://elixir.bootlin.com/linux/latest/source/drivers/spi/spi-sun6i.c#L195
Which seems to match what you're saying. So what did you change
exactly?
> I also applied DMA stuff offered? by Michal ([3] hramrach at gmail.com)
> and it works great too.
That patch has never been sumbitted upstream as far as I know, so
I don't really care about it.
Maxime
--
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180327/3ff3ed71/attachment.sig>
next prev parent reply other threads:[~2018-03-27 7:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-19 15:43 sun6i SPI driver issue Sergey Suloev
2018-03-26 11:45 ` Maxime Ripard
[not found] ` <1aab0d1b-cdd4-cdbc-0242-af5d180e581b@orpaltech.com>
2018-03-27 7:47 ` Maxime Ripard [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-03-24 6:42 sun6i spi " Sergey Suloev
2018-03-27 7:49 ` Maxime Ripard
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=20180327074740.epkhjsu3bqhgk32d@flea \
--to=maxime.ripard@bootlin.com \
--cc=linux-arm-kernel@lists.infradead.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