Skip to content

Instantly share code, notes, and snippets.

View notro's full-sized avatar

Noralf Trønnes notro

View GitHub Profile
/*
* Device Tree overlay for fbtft drivers
*/
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835";
From bcea026824853572ef100dafb23ac2a3b6bd9fc8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= <noralf@tronnes.org>
Date: Mon, 19 Jul 2021 18:23:14 +0200
Subject: [PATCH 5/5] connector: Add new DRM connector types
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
---
I used ftrace to try and find where the problem is, and have tracked it to spi-bcm2835.
Pi4 spends 19.907 ms sending the pixel data and Pi zero spends 29.990 ms.
trace-cmd is available on the 'pi' image.
Pi4
---
# trace-cmd record -o /tmp/trace.dat -p function_graph -l mipi_dbi_fb_dirty -l spi_transfer_one_message
Host: Raspberry Pi 4
Device: Raspberry Pi Zero
SPI speed: 66.6MHz (spi_hz=70000000 clk_hz=400000000 => cdiv=6 => effective_speed_hz=66666666)
(see bcm2835_spi_transfer_one() for details)
pi@pi4:~ $ sudo python3 ~/work/projects/notro-gud/tests/perf.py -f RGB565 -i 50
Iterations: 50
Host: Raspberry Pi 4
Device: Raspberry Pi 4
SPI speed: 62.5MHz (spi_hz=70000000 clk_hz=500000000 => cdiv=8 => effective_speed_hz=62500000)
(see bcm2835_spi_transfer_one() for details)
pi@pi4:~ $ sudo python3 ~/work/projects/notro-gud/tests/perf.py -f RGB565 -i 50
Iterations: 50
Host: Raspberry Pi 4
Device: Raspberry Pico pico-display
pi@pi4:~ $ sudo python3 ~/work/projects/notro-gud/tests/perf.py -i 50
Iterations: 50
240x135-0@RGB565
No compress : 15.1 > 14.8 > 14.3 fps (67.614 ms)
Compress x0: 14.7 > 14.1 > 14.0 fps (70.838 ms)
Compress x1: 15.0 > 14.2 > 14.1 fps (70.185 ms)
Host: Raspberry Pi 4
Device: Raspberry Pico RPi-Display
pi@pi4:~ $ sudo python3 ~/work/projects/notro-gud/tests/perf.py -i 50
Iterations: 50
320x240-0@RGB565
No compress : 6.3 > 6.2 > 6.1 fps (162.383 ms) (split:2)
Compress x0: 6.2 > 6.1 > 6.0 fps (164.444 ms) (split:2)
Compress x1: 6.0 > 5.9 > 5.8 fps (168.977 ms) (split:2)
Host: Raspberry Pi 4
Device: Raspberry Pi 4
pi@pi4:~ $ sudo python3 ~/work/projects/notro-gud/tests/perf.py -i 50
Iterations: 50
1920x1080-60@XRGB8888
No compress : 3.8 > 3.5 > 3.5 fps (283.704 ms) (split:2)
Compress x0: 3.2 > 3.1 > 2.8 fps (327.705 ms) (split:2)
Compress x1: 3.2 > 3.0 > 2.8 fps (331.469 ms) (split:2)
Host: Raspberry Pi 4
Device: Raspberry Pi Zero
pi@pi4:~ $ sudo python3 ~/work/projects/notro-gud/tests/perf.py -i 50
Iterations: 50
1920x1080-60@XRGB8888
No compress : 3.4 > 3.2 > 3.1 fps (314.599 ms) (split:2)
Compress x0: 3.2 > 3.0 > 2.7 fps (333.485 ms) (split:2)
Compress x1: 3.2 > 3.0 > 2.7 fps (334.175 ms) (split:2)
Host: Raspberry Pi 4
Device: Rock Pi 4
pi@pi4:~ $ sudo python3 ~/work/projects/notro-gud/tests/perf.py -i 50
Iterations: 50
1920x1080-60@XRGB8888
No compress : 10.3 > 9.5 > 8.9 fps (105.401 ms) (split:2)
Compress x0: 6.9 > 6.9 > 6.9 fps (145.269 ms) (split:2)
Compress x1: 6.9 > 6.9 > 6.8 fps (145.292 ms) (split:2)