New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ILI9341 hangs after a few seconds #413
Comments
Try fbcon and just let the cursor blink to see if it lasts longer (small transfer length): con2fbmap 2 8. |
Hi Thanks for your answer ! Tried con2fbmap, worked for more than 20 minutes without hanging. regards |
I was about to suggest disabling DMA, but that is already done in the orangepi source: https://github.com/orangepi-xunlong/linux-sunxi/blob/orangepi-3.4/drivers/video/fbtft/fbtft-core.c Verify this by ensuring that DMA is gone from the driver load message: Further debugging requires building a kernel and is beyond what I can assist you with here. |
Strange, I'm sure that DMA is enabled ! |
I've made a test with dma=0 (checked in dmesg). Made another test : I refresh the whole screen (cat /dev/urandom > /dev/fb8), wait 1 second, and repeat... [ 379.550473] fb_ili9340 spi0.0: Display update: 992 kB/s (150.410 ms), fps=0 (1069.629 ms) It did more than 150 copies (and so 300 refresh) and did not hanged ! My SDL software is making screen refresh every 30 ms (approx.). Could there be a "thread" problem ? fbtft read data as the software updates it ? Update : that is totally random ... |
There are 2 different fbdev code paths that lead to a display update:
Both code paths uses the same worker (info->deferred_work) which results in fbtft_deferred_io() being called after a delay. If I were to troubleshoot this, I would build a kernel and just let fbtft_write_spi() return 0 right away to see if the problem is in the spi driver. |
Thanks for those details. I don't have enought time at the moment to build a custom kernel, but I'll give a try as soon as possible. |
Got some time to try with another distro : Seemed to work a few minutes, then I had to reboot, and didn't worked long, but some information in dmesg : (Code is "long", made a pastebin : http://pastebin.com/PeV0mHkJ) |
These are the two important ones: sunxi_spi_transfer() queue up work that calls into sunxi_spi_work() which calls into sunxi_spi_xfer() and probably gets stuck waiting for an interrupt or some other problem (just guessing). sunxi_spi_xfer() is probably inlined thats why it doesn't show up here.
This looks like a good source candidate for the spi master driver: https://github.com/loboris/OrangePI-Kernel/blob/master/linux-3.4/drivers/spi/spi-sunxi.c This is the one that initiated the transfer and waits for the other thread to signal completion:
Ref: http://lxr.free-electrons.com/ident?v=3.4;i=spi_sync So it seems to be a spi master driver problem. You have to build a kernel with debuging enabled in the driver to be sure. |
Ok, thanks for pointing out the problem. I'm switching on a raspberry pi 3, since it seems that this but doesn't exist there ! Thanks again for your time ! |
Well... |
News about this bug? I've the same problem with ILI9486. When refresh rate became high and for the entire screen, the tft hangs. No matter what I do, I'm not unable to update it again until I reboot the system |
Hi, I haven't checked back on a Orange pi PC, but I didn't had the issue on a raspberry pi 3. It seems to be a bug related to spi/dma driver on allwinner H3 kernel. |
It's sad no one tried to solve this problem and update the kernel. I think I will migrate to a Raspberry. Thanks for the reply |
The problem is highly due to allwinner spi "driver", hence the job will certainly be done via sunxi team ? |
Yes, the problem must be resolved by their team. I've tried everything and the problem is less often when the fps are higher (don't ask me why). With 100FPS for example the problem appear after some minutes and not after 10 seconds |
Hi any news on this topic, having the same problem, what do you need in order to fix this i could do some test provide logs .... just let me know thanks in advance |
Closing issue since there has been no activity for more than 2 months. Reopen if needed. |
commenting to save others from redoing whole search. on Allwinner H3 and similar max transfer spi is limited to 64 bytes, otherwise controller could get confused sometimes. in legacy kernel (3.4.x) the workaround is to use txbuflen=64 with fbtft_device, in mainline kernels it's already fixed. cheers! |
Hi
I'm using fbtft_ili9340 (for adafruit22a-like device) on an Orange Pi Pc, armbian last release (3.4.112-sun8i ).
I can get a display. This is OK.
I've tried some things :
I did tried another power supply, same result.
The board itself doesn't hang (still able to ssh into it), but when it freeze, I cannot rmmod module.
How can I help debugging this ?
The text was updated successfully, but these errors were encountered: