Re: GPU acceleration with SPI displays (STM32MP157 with Vivante GPU)
Josef Luštický <[email protected]> Tue, 5 Aug 2025 08:46:54 +0200
| Newsgroups | gmane.comp.video.mesa3d.devel |
|---|---|
| Message-ID | <CACnTymY29xXhm3EdusX5Ex-E=8vZ50DbR+WtJVy14LWhMd_Czg@mail.gmail.com> |
On Mon, Aug 4, 2025 at 11:59 AM Lucas Stach <[email protected]> wrote: > > Hi Josef, Hello Lucas, thank you for answering. > > Am Freitag, dem 01.08.2025 um 13:06 +0200 schrieb Josef Luštický: > > Hello, > > I am trying to get GPU acceleration to work with SPI display using > > ili9225_dri.so, > > and I use kmscube to test. > > The SoC is STM32MP157c with Vivante GC400 GPU and I use Mesa3D 24.0.9 > > (rootfs generated with Buildroot 2025.02.3) and kernel 5.10.176 (from > > STM). > > > > I also have the same system with MIPI Display attached. > > While kmscube renders at 60 fps with the MIPI Display system, I get > > only 11 fps with the SPI display. Apart from that both systems are the > > same. > > The question is what can you expect from a SPI display? SPI is not a > great interface for isochronous traffic with quite high bandwidth > demands. Even at really low resolutions you need a lot of bandwidth to > update a display. What is the resolution and color depth of you > display? How fast is your SPI connection? The display is 320x480 with 16bpp, so the screen is 307200 bytes. The SPI clock is set to 50MHz in device-tree and I also tried 100MHz with no change. From the clock tree configuration, it seems the SPI peripheral gets 64MHz, but I'll check what's the real frequency of SPI CLK output. > > You might run modetest -v to get a reference point on how fast the > display can be updated without any GPU rendering going on. > > Regards, > Lucas > > > > > I checked the output of kmscube and it prints the exact same extensions on both, > > the only difference is the framerate. > > I also checked output of kmscube's /proc/PID/maps and the only > > difference is that with MIPI Display it loads /usr/lib/dri/stm_dri.so > > while with the SPI Display it loads /usr/lib/dri/ili9225_dri.so, > > but I see those files are the same (hardlinks). > > Both open /dev/dri/renderD128 (GPU). > > > > Why am I getting just 11 fps on the system with SPI Display? > > Is there some architectural limitation, either in Mesa, kernel, or HW-related? > > I suppose both setups use kernel's KMS as renderer only (kmsro), thus > > it should render at the same framerate. > > The difference in HW is the peripheral the displays use - LTDC > > (stm_dri.so) vs. SPI (eventually ili9225_dri.so). > > Why do I see no /usr/lib/etnaviv_dri.so loaded? > > > > The MIPI Display is attached to the LTDC (LCD Timing Display > > Controller) peripheral of the STM SoC and the display driver is > > drivers/gpu/drm/panel/panel-sitronix-st7703.c (DRM panel). > > > > The SPI display driver uses the kernel's TinyDRM API and its driver is > > drivers/gpu/drm/tiny/ili9225.c. > > > > I also tried softpipe (disabled GPU in device-tree) and it renders 7 > > fps on both systems. > > > > I attach the output from kmscube on the SPI Display system (the MIPI > > Display is the same except framerate is 60 fps.) > > > > Kind regards > > Josef Lusticky >