Skip to content
Noralf Trønnes edited this page Jul 1, 2022 · 4 revisions

panel-mipi-dbi can replace the SPI interface support in these fbtft drivers:

$ grep -lr MIPI_DCS drivers/staging/fbtft/ | grep -v "-" | uniq | sort
drivers/staging/fbtft/fb_hx8340bn.c
drivers/staging/fbtft/fb_hx8353d.c
drivers/staging/fbtft/fb_hx8357d.c
drivers/staging/fbtft/fb_ili9163.c
drivers/staging/fbtft/fb_ili9340.c
drivers/staging/fbtft/fb_ili9341.c
drivers/staging/fbtft/fb_ili9481.c
drivers/staging/fbtft/fb_ili9486.c
drivers/staging/fbtft/fb_s6d02a1.c
drivers/staging/fbtft/fb_st7735r.c
drivers/staging/fbtft/fb_st7789v.c
drivers/staging/fbtft/fb_tinylcd.c

Note that the MIPI DBI parallel interface supported by fbtft does not yet exist in DRM (drm_mipi_dbi).

fbtft vs. DRM

  • fbtft turns on the display when the driver is loaded - DRM turns on the display when it's first used.

  • reset-gpios is active high in fbtft and active low in panel-mipi-dbi.

  • fbtft has led-gpios for backlight on/off control, panel-mipi-dbi has a backlight DT property (so pwm is supported).

  • panel-mipi-dbi runs pixel data at spi-max-frequency and init commands at <=10MHz. This makes it possible to push the envelope without the risk of messing up the controller configuration due to command transmission errors.

  • panel-mipi-dbi supports panels placed at an offset in controller RAM - fbtft can only do this with hardcoded offsets in the driver.

  • DRM updates the display when userspace asks for it - fbtft does it at a fixed interval (fps parameter) after video memory has been written to.

  • fbtft only supports full width partial display updates - DRM doesn't have this restriction.

  • DRM supports double-buffering/page-flips.

  • DRM supports rendering on a GPU and scanout on the display (PRIME) (no need for rpi-fbcp).

fbdev

DRM has fbdev emulation support which makes it behave much like the fbtft drivers.

  • An fbdev application has to enable the display (using IOCTL's) before it lights up, it's not enough to just write something to /dev/fb<n>. When it's first enabled it stays enabled.

  • If an application opens the DRM device (/sys/class/drm/card*) and then closes it, fbdev will be restored and the displays stays enabled (flickering during modeset).

  • drm_kms_helper.fbdev_emulation=0 on the kernel cmdline will disable fbdev emulation for all DRM drivers.

rpi-fbcp

rpi-fbcp is used on the Raspberry Pi to continuously copy the firmware framebuffer to an fbdev device. This gives hardware accelerated rendering with scanout on another fbdev display than the firmware controlled fbdev/DRM device.

rpi-fbcp does work with panel-mipi-dbi however the firmware framebuffer (DispmanX) is only available when using the vc4-fkms-v3d overlay and not when using vc4-kms-v3d which enables the Linux kernel drivers vc4 and v3d. The firmware framebuffer (fkms) will most likely be discontinued in some future Raspberry Pi OS release.

Clone this wiki locally