[Letux-kernel] LX16 SPI display
H. Nikolaus Schaller
hns at goldelico.com
Thu Feb 27 14:58:29 CET 2025
Hi all,
Now I found some minutes to test the new video-demo also on the GTA04.
Key findings:
- on Debian 11.11 mplayer is broken with the same error as https://bugs.gentoo.org/652126
- on Debian 8.11 mplayer(2) works on both, GTA04 and LX16
- GTA04 is very significantly faster. Haven't checked how fast it really is, but seems to be close to the 25 FPS. No flicker, smooth video. And all this at higher resolution.
- but: LX16 boots faster...
So does anyone have an idea if the mplayer bug is known to Debian? How should it be reported? Or have they abandoned mplayer already?
BR,
Nikolaus
> Am 18.02.2025 um 19:17 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>
> Hi all,
> there is big improvement to report!
>
> In a first step I have again improved the video-demo script. It now detects if it can configure a sound card through the Letux/root/twl script and pass -nosound to mplayer if that fails.
>
> And while trying to run this with a newly compiled 6.14-rc3 kernel test branch I got a better frame rate and no glitches.
>
> It turned out that two significant patches were not yet in the letux-current tree or our upstream attempt so that only the test branch sitting on top of letux-current was better. And, I recently had used a different test branch to develop the new SPI clock divider patch, and there, these patches were missing.
>
> So only after integrating the clock divider patch into letux/x1600 and rebasing all my private project branches and luckily testing the branch with the missing patches I got this even better result than ever before.
>
> The missing ones were:
>
> spi: ingenic: finalize upon outbound DMA transfers
> spi: ingenic: hack to fix issue in CGU.SSICDR
>
> With these patches now fully integrated, I get approx. 4 FPS @ 30 MHz SPI clock. Of course the "hack" patch must be significantly reworked, before we can submit it upstream.
>
> Now for evaluation of the result: in theory, a 30 MHz SPI clock and a 16 bit x 480 x 320 pixels display should have an upper limit of 12.2 FPS. So there is still a factor 3. A hint is that the 'top' tool reports approx. 85% CPU load of Xorg and 15% of mplayer. Which is interesting, since mplayer has to convert .ogg to xlib data packets which I would assume to be the more heavy workload (but may be FPU accelerated). So the bottleneck is obviously between Xorg and SPI and the display.
>
> Another hint that Xorg is the bottleneck and not the display driver or SPI could be that the MOSI/MISO/CE LEDs on my GPIO board connected between LX16 and display is flickering shortly once per frame. This indicates that data transfer is quick but providing the next frame is slow.
>
> Other good news is that there is no "Your system is too SLOW to play this!" message any more.
>
> And, the "spi_master spi0: noqueue transfer failed" have become rare, but have not disappeared completely. There were some after login and one while playing the video for 15 minutes. There was also a "warn alloc" kernel log message.
>
> Anyways a good step forwards.
>
> The working branch is here:
>
> https://git.goldelico.com/?p=letux-kernel.git;a=shortlog;h=refs/heads/project-wlan@lx16%2Cpyra%2Craspi%2Btinydrm-spi-display@raspi%2Clx16%2Cci20%2B1w@raspi%2Clc8%2Cgta15-v17
>
> and includes the latest video demo script:
>
> https://git.goldelico.com/?p=letux-kernel.git;a=blob;f=Letux/root/video-demo;h=edbbfb7855e33a7ed2ee629b1e740587e6793276;hb=4bddb765c159074abf661164c247ee8ea0b7aeb3
>
> BR,
> Nikolaus
>
> PS: I have ordered some PCBs for LX16 v0.4 and continued to work on the LX20 schematics and PCB.
>
>> Am 17.02.2025 um 17:19 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>>
>> Hi all,
>>
>> I have now repaired the Letux/video-demo (mplayer setup) so that I can really have a movie on the LX16 display and look what happens.
>>
>> Code is here:
>>
>> https://git.goldelico.com/?p=letux-kernel.git;a=blob;f=Letux/root/video-demo;h=942342b358cf6f8ee240835c274746e13c915b99;hb=refs/heads/letux-current
>>
>> When running (with Xorg) there is a lot of infos about missing audio first,
>> but we can ignore (better, the script should ignore if it can not find any
>> soundcard).
>>
>> Nicely, the video starts - at a quite slow frame rate, but it starts.
>> Frame rate is very limited. Likely because there is no scaler and color
>> space conversion hardware so that the CPU has to do the hard work.
>> And therefore the message "Your system is too SLOW to play this!" is reasonable...
>>
>> On the other hand the frame update is visible going from top of screen
>> to bottom. I would assume that the conversions are not done on the fly
>> but the updates from the mplayer buffer through Xorg to the display are
>> limited in speed.
>>
>> AFAIR (haven't tested for years) it runs quite well on a 600 MHz OMAP3.
>>
>> Here is a log:
>>
>> ....
>>
>> Starting playback...
>> VIDEO: 854x480 24.000 fps 0.0 kbps ( 0.0 kB/s)
>> VO: [x11] 854x480 => 854x480 Planar YV12 [swscaler @ 0x76750aa0]No accelerated colorspace conversion found from yuv420p to rgb565le.
>> [swscaler @ 0x76750aa0]using unscaled yuv420p -> rgb565le special converter
>> [ 91.965419] spi_master spi0: noqueue transfer failed
>> A: 0.3 V: 0.0 A-V: 0.258 ct: 0.001 0/ 0 ??% ??% ??,?% 1 0 $<3>
>> [VD_FFMPEG] DRI failure.
>> A: 10.2 V: 2.1 A-V: 8.146 ct: 0.203 0/ 0 165% 664% 63.7% 50 0 $<3>
>>
>> ************************************************
>> **** Your system is too SLOW to play this! ****
>> ************************************************
>>
>> [ 113.202379] spi_master spi0: noqueue transfer failed75% 54.7% 103 0 $<3
>> [ 113.202661] ili9486 spi0.0: [drm] *ERROR* Failed to update display -12
>> [ 113.371791] spi_master spi0: noqueue transfer failed69% 55.7% 104 0 $<3>
>> A: 19.1 V: 4.0 A-V: 15.098 ct: 0.258 0/ 0 132% 654% 58.3% 95 0 $<3>
>>
>> But more interesting is that there are still noqueue transfer failed messages
>> from the SPI driver.
>>
>> This happens even if I have no display connected and there is no interleaved
>> communication with the touch screen controller.
>>
>> So we still appear to have some issue in our clock/SPI driver setup and
>> communication with Xorg.
>>
>> Any ideas how to proceed?
>>
>> BR,
>> Nikolaus
>>
>> _______________________________________________
>> https://projects.goldelico.com/p/gta04-kernel/
>> Letux-kernel mailing list
>> Letux-kernel at openphoenux.org
>> http://lists.goldelico.com/mailman/listinfo.cgi/letux-kernel
>
More information about the Letux-kernel
mailing list