juj / fbcp-ili9341

A blazing fast display driver for SPI-based LCD displays for Raspberry Pi A, B, 2, 3, 4 and Zero
MIT License
1.59k stars 265 forks source link

Working on original Pi model B with Adafruit 2.8 inch resistive screen #312

Open xunker opened 1 year ago

xunker commented 1 year ago

Just a note that I have got your tool working on my original (2011.12) Pi Model B. Thank you for putting all the effort in to making it work!

Test System

Video Modes

Here are the video modes I've tested, along with the applicable lines from /boot/config.txt.

512x342 (for Mac Plus/Mini vMac), 10 fps

gpu_mem=32 # optional, just to free up memory
hdmi_cvt=512 342 10 1 0 0 0 # [width] [height] [framerate] [aspect] [margins] [interlace] [rb]
hdmi_group=2
hdmi_mode=87

640x480, 10 fps

gpu_mem=32 # optional, just to free up memory
hdmi_cvt=640 480 10 1 0 0 0 # [width] [height] [framerate] [aspect] [margins] [interlace] [rb]
hdmi_group=2
hdmi_mode=87

800x600

hdmi_group=2
hdmi_mode=9

1024x768

hdmi_group=2
hdmi_mode=16

Build options

Here are the options I used:

# DMA
cmake -DSPI_BUS_CLOCK_DIVISOR=6 -DADAFRUIT_ILI9341_PITFT=ON \
      -DBACKLIGHT_CONTROL=OFF -DSINGLE_CORE_BOARD=ON \
      -DARMV6Z=ON -DSTATISTICS=0 \
      -DUSE_DMA_TRANSFERS=ON -DDMA_RX_CHANNEL=4

# Non-DMA
cmake -DSPI_BUS_CLOCK_DIVISOR=6 -DADAFRUIT_ILI9341_PITFT=ON \
      -DBACKLIGHT_CONTROL=OFF -DSINGLE_CORE_BOARD=ON \
      -DARMV6Z=ON -DSTATISTICS=0 -DUSE_DMA_TRANSFERS=OFF

On my machine, the the default RX DMA channel was used, and 4 was the next channel that worked.

I haven't tried backlight control yet, that the reason for -DBACKLIGHT_CONTROL=OFF.

Installation Notes

I used the systemd install instructions, but needed to do a couple of things extra:

After those two extra steps, fbcp started up properly on boot.

CPU Usage

I watched the CPU usage in 640x480@10fps for one minute with an static screen. Here is the CPU usage I recorded:

Even without DMA, the CPU usage is 1/3rd of Notro/fbtft with the same resolution and fps! Nice work!

adafruit28r-pimac