notro / fbtft

Linux Framebuffer drivers for small TFT LCD display modules. Development has moved to https://git.kernel.org/cgit/linux/kernel/git/gregkh/staging.git/tree/drivers/staging/fbtft?h=staging-testing
1.84k stars 495 forks source link

SPI display as a secondary display? #584

Closed amiotk closed 2 years ago

amiotk commented 2 years ago

Hello

I would like to run a simple GTK3 GUI on a 3.5" SPI ILI9341 display. I can get an image displayed on the LCD by using FBTFT and writing to /dev/fb1 - this works great. Is there any way of setting the X server to treat /dev/fb1 as a secondary display, or am I living in a dream? The use case is to have HDMI display as primary and SPI as secondary display running standard Linux app. I know there are different solutions like GTKFB for GTK2 or QT for embedded, but sticking in GTK3 would save me from rewriting the app.

Thanks

notro commented 2 years ago

I don't know if the X server can mix and match DRM and FB devices and I haven't looked much at the userspace side of graphics myself.

A search turned up this recent post: Dual display support with legacy driver (HDMI + SPI-LCD on RPi4) https://forums.raspberrypi.com/viewtopic.php?t=306624

There's a a new DRM driver coming up that should work with your display, but it's not in mainline yet. It will be backported to rpi-linux-5.15 at some point. https://github.com/notro/panel-mipi-dbi/wiki

amiotk commented 2 years ago

@notro thanks for the reply. Based on the Raspberry Pi forum topic you found, I think I should be able to pull this off. The new DRM drivers look really great, but I'm stuck with 4.4 kernel, so most probably can't use them.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.