GPU acceleration with SPI displays (TinyDRM)
Josef Luštický
josef.lusticky at braiins.cz
Fri Aug 8 13:03:35 UTC 2025
Hello Noralf,
thank you for your reply and for the debugging info.
Meanwhile I got reply from Lucas,
and figured out that on the display with 320x480 and 16bpp:
with 32MHz the theoretical maximum is 32000000 / (320*480*16) = 13 fps
and kmscube renders at 11 fps.
With 50MHZ it is 50000000 / (320*480*16) = 20.3 fps, and I kmscube
rederns at 17 fps.
I did not know that the rendering frame-rate is limited by the screen
refresh rate,
because when I tried to run some EGL demo in Weston, it renders around 60 fps,
but my understanding is that the Weston output itself gets limited in this case.
Best regards
Josef
On Wed, Aug 6, 2025 at 11:15 PM Noralf Trønnes <noralf at tronnes.org> wrote:
>
> Hi,
>
> At what speed are you running the SPI bus?
>
> Theoretical fps for a 176x220 RGB565 display at 32MHZ:
> 32*1024*1024/176/220/16 = 54fps
>
> Try modetest to see max fps:
> https://github.com/notro/panel-mipi-dbi/wiki/Debugging#modetest
>
> I don't remember the command line switch to have it run continously
> showing the fps.
>
> Noralf.
>
>
> Den 04.08.2025 09:54, skrev Josef Luštický:
> > Hello,
> > is it possible to use GPU acceleration with TinyDRM drivers?
> > I am testing on STM32MP157c SoC with Vivante GC400 GPU and I use
> > Mesa3D 24.0.9 (rootfs generated with Buildroot 2025.02.3) and kernel
> > 5.10.176.
> >
> > To compare, I also have the same system but with a MIPI DSI display.
> > While kmscube renders at 60 fps with the MIPI DSI display, I get only
> > 11 fps with the SPI display (TinyDRM driver).
> >
> > 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 into framebuffer.
> > The difference in HW is the peripheral the displays use - MIPI DSI
> > display utilizes LTDC peripheral (kmscube loads
> > /usr/lib/dri/stm_dri.so) vs. SPI display uses just SPI (ksmcube loads
> > /usr/lib/dri/ili9225_dri.so). Both .so files are hard links.
> > Both open /dev/dri/renderD128 (GPU).
> >
> > The MIPI DSI display is connected to the DSI Host peripheral which
> > just transcodes the parallel RGB pixel stream from the LTDC (LCD
> > Timing Display Controller) peripheral of the STM SoC.
> > 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 , but I can change to any other driver
> > if needed (eventually to the generic panel-mipi-dbi-spi).
> > Could rewriting the TinyDRM driver to a panel driver in
> > drivers/gpu/drm/panel/ help?
> >
> > I also tried software rendering "softpipe" (disabled GPU in
> > device-tree) and it renders 7 fps on both systems. Thus, I suppose,
> > that some form of GPU acceleration is already used.
> >
> > Mesa reports the same loaded GL-extensions on both systems and apart
> > from loaded .so files everything seems to be the same.
> >
> > Best regards
> > Josef Lusticky
More information about the dri-devel
mailing list