Hacker News new | ask | show | jobs
by arghwhat 895 days ago
Note that fbdev use deprecated because it's a really bad and broken kernel API.

One can use KMS directly, but at that point you're just implementing all the logic of a display server and might as well just use a small kiosk-style Wayland display server instead.

2 comments

That comment assumes that nothing but Linux exists. I’ve ported netsurf to very very non-Linux environments that just had a framebuffer. So no “just use Wayland” is not the answer. (Ever)
"just had a framebuffer" != Using fbdev. fbdev is a specific outdated API, which drivers only emulate for compatibility with e.g. fbcon (the kernel's terminal emulator).

KMS is how you control the display hardware formally on FreeBSD and Linux. Other platforms will have their own APIs for doing this, but you are writing all the bits of a display server for that platform.

And, well, a small kiosk Wayland server is basically just KMS + libinput + a tiny IPC layer. All you save by doing this yourself is the last bit, but at the cost of having to deal with e.g. display modesetting and GPU buffer management.

how is it broken?
The Xorg fbdev driver is deprecated. If you're not Xorg but you want to easily put some pixels on the screen, fbdev is still for you.

The Linux fbdev subsystem is deprecated, but the fb devices will be emulated with DRM because they are useful.

is there an easy way to get a framebuffer with DRM without using fbdev?
It's not super easy. You need to allocate a buffer, modeset the display and commit the buffer.

But if you're doing that, then you've implemented a big portion of a display server. So... Just use one.

"dumb buffers" it's called. man drm-memory