-
Notifications
You must be signed in to change notification settings - Fork 495
Performance
This is some performance tests I have run on my displays.
Debug output is turned on to get fps numbers in the kernel log.
A full screen movie is run to make sure the entire display is updated for each frame sent.
Wiring: From the Raspberry Pi through a 16cm (6 inch) flat cable to a protoboard with a connector for the display (unless it's a display HAT).
These tests are run on an otherwise idle system. No competition for the internal memory bus. USB audio would most likely stutter.
This video is used in the testing
wget http://fredrik.hubbe.net/plugger/test.mpg
# on 480x320 displays, a custom version of the file is used
sudo apt-get install mencoder
mencoder test.mpg -ovc lavc -lavcopts vcodec=mpeg4 -vf scale=480:320 -o test_480_320.mpg
What does the debug output mean? (dmesg)
[ 733.962701] fb_ili9341 spi0.0: Display update: 1073 kB/s (139.677 ms), fps=5 (180.026 ms)
[ 733.962701] - timestamp
fb_ili9341 - driver
spi0.0 - spi bus 0, chip select 0
Display update - task
1073 kB/s (139.677 ms) - This transfer took 139ms at 1073 kB/s
fps=5 (180.026 ms) - 180ms since last frame sent. Assuming a full update, this gives 5 fps.
See FPS for info on the fps parameter.
Tontec 3.5" 480x320 touch display
/boot/config.txt
dtoverlay=mz61581,debug=32
$ mplayer -nolirc -vo fbdev2:/dev/fb1 test_480_320.mpg
[ 5.158540] graphics fb1: fb_s6d02a1 frame buffer, 480x320, 300 KiB video memory, 4 KiB DMA buffer memory, fps=33, spi0.0 at 128 MHz
[ 56.904256] fb_s6d02a1 spi0.0: Display update: 12273 kB/s (24.443 ms), fps=19 (50.048 ms)
[ 56.974248] fb_s6d02a1 spi0.0: Display update: 12267 kB/s (24.453 ms), fps=14 (69.984 ms)
/boot/config.txt
dtoverlay=mz61581,fps=50,debug=32
$ mplayer -nolirc -vo fbdev2:/dev/fb1 test_480_320.mpg
[ 5.487452] graphics fb1: fb_s6d02a1 frame buffer, 480x320, 300 KiB video memory, 4 KiB DMA buffer memory, fps=50, spi0.0 at 128 MHz
[ 50.444463] fb_s6d02a1 spi0.0: Display update: 12235 kB/s (24.518 ms), fps=25 (39.995 ms)
[ 50.484470] fb_s6d02a1 spi0.0: Display update: 12231 kB/s (24.525 ms), fps=25 (40.000 ms)
Raspberry Pi display shield
sudo dmesg -C; sudo modprobe fbtft_device name=pitft rotate=90 speed=32000000 debug=$((1<<5))
mplayer -nolirc -vo fbdev2:/dev/fb1 -vf scale=320:-3 /home/pi/test.mpg
[ 1457.397695] fb_ili9340 spi0.0: Display update: 3403 kB/s (44.071 ms), fps=11 (90.028 ms)
sudo dmesg -C; sudo modprobe fbtft_device name=pitft rotate=90 speed=48000000 debug=$((1<<5))
mplayer -nolirc -vo fbdev2:/dev/fb1 -vf scale=320:-3 /home/pi/test.mpg
[ 1532.093850] fb_ili9340 spi0.0: Display update: 4392 kB/s (34.146 ms), fps=12 (80.029 ms)
sudo dmesg -C; sudo modprobe fbtft_device name=pitft rotate=90 speed=48000000 debug=$((1<<5)) fps=30
mplayer -nolirc -vo fbdev2:/dev/fb1 -vf scale=320:-3 /home/pi/test.mpg
[ 1565.276286] fb_ili9340 spi0.0: Display update: 4404 kB/s (34.051 ms), fps=16 (60.000 ms)
sudo dmesg -C; sudo modprobe fbtft_device name=pitft rotate=90 speed=48000000 debug=$((1<<5)) fps=50
mplayer -nolirc -vo fbdev2:/dev/fb1 -vf scale=320:-3 /home/pi/test.mpg
[ 1614.220047] fb_ili9340 spi0.0: Display update: 4384 kB/s (34.208 ms), fps=19 (50.019 ms)
Watterott 2.8" 320x240 display (MI0283QT-9a panel)
/boot/config.txt
dtoverlay=rpi-display,fps=50,speed=48000000,debug=32
$ mplayer -nolirc -vo fbdev2:/dev/fb1 -vf scale=320:-3 /home/pi/test.mpg
$ dmesg
[ 51.624455] fb_ili9341 spi0.0: Display update: 4434 kB/s (33.824 ms), fps=20 (49.843 ms)
HY28A display
sudo modprobe fbtft_device name=hy28a rotate=90 speed=32000000 debug=$((1<<5)) gpios=reset:25,led:18
mplayer -nolirc -vo fbdev2:/dev/fb1 -vf scale=320:-3 /home/pi/test.mpg
[ 1020.379890] fb_ili9320 spi0.0: Display update: 3397 kB/s (44.140 ms), fps=11 (89.937 ms)
sudo modprobe fbtft_device name=hy28a rotate=90 speed=48000000 debug=$((1<<5)) gpios=reset:25,led:18 fps=50
mplayer -nolirc -vo fbdev2:/dev/fb1 -vf scale=320:-3 /home/pi/test.mpg
[ 1146.105369] fb_ili9320 spi0.0: Display update: 4376 kB/s (34.264 ms), fps=20 (49.941 ms)
tinylcd.com 3.5" display.
sudo modprobe fbtft_device name=tinylcd35 rotate=90 speed=32000000 debug=$((1<<5))
mplayer -nolirc -vo fbdev2:/dev/fb1 test_480_320.mpg
[ 2706.337429] fb_tinylcd spi0.0: Display update: 3416 kB/s (87.802 ms), fps=7 (130.004 ms)
sudo modprobe fbtft_device name=tinylcd35 rotate=90 speed=48000000 debug=$((1<<5)) fps=50
mplayer -nolirc -vo fbdev2:/dev/fb1 test_480_320.mpg
[ 2755.461039] fb_tinylcd spi0.0: Display update: 4368 kB/s (68.676 ms), fps=12 (80.649 ms)
The new Adafruit 2.2" display.
sudo modprobe fbtft_device name=adafruit22a rotate=90 speed=32000000 debug=$((1<<5))
mplayer -nolirc -vo fbdev2:/dev/fb1 -vf scale=320:-3 /home/pi/test.mpg
[ 6151.670572] fb_ili9340 spi0.0: Display update: 3389 kB/s (44.246 ms), fps=11 (90.064 ms)
sudo modprobe fbtft_device name=adafruit22a rotate=90 speed=32000000 debug=$((1<<5)) fps=50
mplayer -nolirc -vo fbdev2:/dev/fb1 -vf scale=320:-3 /home/pi/test.mpg
[ 6185.932236] fb_ili9340 spi0.0: Display update: 3381 kB/s (44.353 ms), fps=16 (60.040 ms)
ITDB02.8 display connected with 8-bit parallel bus.
DMA doesn't apply here.
sudo modprobe fbtft_device name=itdb28 rotate=90 speed=16000000 debug=$((1<<5)) gpios=reset:17,dc:3,wr:2,cs:27,db00:9,db01:11,db02:18,db03:23,db04:24,db05:25,db06:8,db07:7,led:4
mplayer -nolirc -vo fbdev2:/dev/fb1 -vf scale=320:-3 /home/pi/test.mpg
[58612.255503] fb_ili9325 fb_ili9325.0: Display update: 3976 kB/s (37.717 ms), fps=12 (79.999 ms)
sudo modprobe fbtft_device name=itdb28 rotate=90 speed=16000000 debug=$((1<<5)) gpios=reset:17,dc:3,wr:2,cs:27,db00:9,db01:11,db02:18,db03:23,db04:24,db05:25,db06:8,db07:7,led:4 fps=50
mplayer -nolirc -vo fbdev2:/dev/fb1 -vf scale=320:-3 /home/pi/test.mpg
[58662.537677] fb_ili9325 fb_ili9325.0: Display update: 3986 kB/s (37.623 ms), fps=19 (50.010 ms)
CPU IDLE 0%
ITDB02.8 display using the SPI interface circuit. The circuit is soldered on a protoboard.
Did not work in DMA mode.
sudo modprobe fbtft_device name=itdb28_spi rotate=90 speed=24000000 debug=$((1<<5)) gpios=reset:25,dc:24,led:18
mplayer -nolirc -vo fbdev2:/dev/fb1 -vf scale=320:-3 /home/pi/test.mpg
[ 6453.243953] fb_ili9325 spi0.0: Display update: 2772 kB/s (54.088 ms), fps=9 (100.006 ms)
DISTORTED IMAGE
sudo modprobe fbtft_device name=itdb28_spi rotate=90 speed=32000000 debug=$((1<<5)) gpios=reset:25,dc:24,led:18
mplayer -nolirc -vo fbdev2:/dev/fb1 -vf scale=320:-3 /home/pi/test.mpg
[ 6371.160292] fb_ili9325 spi0.0: Display update: 3397 kB/s (44.143 ms), fps=11 (90.004 ms)
DISTORTED IMAGE
without dma
sudo modprobe --first-time fbtft
sudo modprobe fbtft_device name=itdb28_spi rotate=90 speed=32000000 debug=$((1<<5)) gpios=reset:25,dc:24,led:18
mplayer -nolirc -vo fbdev2:/dev/fb1 -vf scale=320:-3 /home/pi/test.mpg
[ 6630.394558] fb_ili9325 spi0.0: Display update: 2647 kB/s (56.640 ms), fps=9 (100.013 ms)
sudo modprobe fbtft_device name=itdb28_spi rotate=90 speed=32000000 debug=$((1<<5)) gpios=reset:25,dc:24,led:18 fps=50
mplayer -nolirc -vo fbdev2:/dev/fb1 -vf scale=320:-3 /home/pi/test.mpg
[ 6693.965756] fb_ili9325 spi0.0: Display update: 2312 kB/s (64.860 ms), fps=12 (80.006 ms)
sudo modprobe fbtft_device name=itdb28_spi rotate=90 speed=48000000 debug=$((1<<5)) gpios=reset:25,dc:24,led:18 fps=50
mplayer -nolirc -vo fbdev2:/dev/fb1 -vf scale=320:-3 /home/pi/test.mpg
[ 6732.157680] fb_ili9325 spi0.0: Display update: 2304 kB/s (65.068 ms), fps=12 (80.025 ms)
Sainsmart 3.2" display using the SPI interface circuit. The circuit is wired up on a breadboard.
Did not work in DMA mode.
sudo modprobe fbtft_device name=sainsmart32_spi rotate=90 speed=16000000 debug=$((1<<5)) gpios=reset:25,dc:24
mplayer -nolirc -vo fbdev2:/dev/fb1 -vf scale=320:-3 /home/pi/test.mpg
DISTORTED IMAGE
Without dma
sudo modprobe --first-time fbtft dma=0
sudo modprobe fbtft_device name=sainsmart32_spi rotate=90 speed=16000000 debug=$((1<<5)) gpios=reset:25,dc:24
mplayer -nolirc -vo fbdev2:/dev/fb1 -vf scale=320:-3 /home/pi/test.mpg
[ 6957.960868] fb_ssd1289 spi0.0: Display update: 1529 kB/s (98.041 ms), fps=7 (140.003 ms)
sudo modprobe fbtft_device name=sainsmart32_spi rotate=90 speed=16000000 debug=$((1<<5)) gpios=reset:25,dc:24 fps=50
mplayer -nolirc -vo fbdev2:/dev/fb1 -vf scale=320:-3 /home/pi/test.mpg
[ 7273.675262] fb_ssd1289 spi0.0: Display update: 1519 kB/s (98.679 ms), fps=9 (109.702 ms)
sudo modprobe fbtft_device name=sainsmart32_spi rotate=90 speed=24000000 debug=$((1<<5)) gpios=reset:25,dc:24 fps=50
mplayer -nolirc -vo fbdev2:/dev/fb1 -vf scale=320:-3 /home/pi/test.mpg
[ 7381.206698] fb_ssd1289 spi0.0: Display update: 2293 kB/s (65.377 ms), fps=12 (79.998 ms)