Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4844

Graphics programming • Re: LVGL v9 on Pi (NOT pico) with DRM

$
0
0
According to the LVGL website, v9 now supports SDL2, frame buffer, and DRM.
I haven't used LVGL, but I might give it a try. I have some experience scrawling on frame buffers and DRM dumb buffers.
I have asked questions in other places (not on Pi Forum), and no one seems to have a working application using DRM.
I tried building a demo application for framebuffer, which works, and for DRM, which doesn't.
At run-time the DRM version complains:

Code:

drm_open: drmGetCap DRM_CAP_DUMB_BUFFER failed or "/dev/dri/card0" doesn't have dumb buffer lv_linux_drm.c:626
Obviously, the last bit refers to a source file/line.
Were you running on a Pi 4 or 5 by any chance. The 4 and 5 have two "cards" in /dev/dri/ and only once has the dumb buffer capability.
I am developing apps targeting the official touchscreen (800x480 7"), and am evaluating various options.
Clearly, framebuffer works, but I see that it is 'deprecated', so ideally I would use DRM instead. I have played with GTK+, but as various postings of mine will testify, I have issues with not being able to make it behave the way I want it too.
I started looking at KMS/DRM dumb buffers for a similar reason.
So, does anyone have a working (on bookworm, Pi3B or later) setup with LVGL 9 and DRM?
I will give it a try when I get a chance.
Stupid question: If I target do DRM, do I need to run X11, Wayfire or labwc (ie some desktop manager)? Obviously going down the FB route, I don't, but I am more concerned with not needing to rewrite stuff when a later version of the hardware/os appears. Been there, done that.
At the moment I have a prototype using Python3 and tkinter, but the app seems to need a lot of memory...
Not a stupid question. When either X11 or Wayland are running, they are the master for DRM. There can only be one master and other programs will not be able to use the DRM dumb buffer while the GUI is active. If you have the GUI active, you can move away from the GUI to one of the Virtual Terminals. To change to a Virtual Terminal use Ctrl-Alt-F1, ... Ctrl-Atl-F6. To get back to the GUI use Ctrl-Alt-F8.

Statistics: Posted by AndyD — Mon Jul 29, 2024 10:56 am



Viewing all articles
Browse latest Browse all 4844

Trending Articles