Posts: 1
Joined: Wed Mar 21, 2018 3:03 pm

Fast framebuffer in upstream kernel?

Wed Mar 21, 2018 3:43 pm

Hi all!

I've been using a Raspberry Pi 3 running Debian GNU/Linux 9 "Stretch" as my main desktop since about July 2017. Internet is very slow where I live so it's not much of a problem if Firefox is a bit slow on Raspberry. ;)

I've been compiling my kernels from downstream so far, but recently I decided to try out an upstream kernel. With 4.15.11, the system mostly just works, kudos for that! There are minor issues (which I did not put much time into, seeing they are really minor): LED triggers are gone but I can fall back to an on-screen biff, so that wouldn't be a problem. The cpufreq governors are gone; I replaced them (and my handwritten userspace frequency control daemon) with "temp_limit=70" and "force_turbo=1" in /boot/config.txt; this is more simplistic but works well enough, keeping the system snappy and temperatures not much higher than before. What bothers me is HDMI output, and that's where I'm hoping for help.

With downstream kernels, I used bcm2708_fb as console and fbdev as the video driver, resulting in a fast 24 bpp visual. With the upstream kernel, there is simplefb, but this only gives me a really slow 16 bpp visual. Redrawing large regions (for example switching from one tab to another one in Firefox) is especially slow. (Apart from the slowless, there's also some ugly colours, and omxplayer does not work, but again, those are minor. Speed however is the difference between "good enough" and "no longer nice".)

So how do I get a fast X display with the upstream kernel?

There's drm_vc4, but no matter which overlay I choose, I always get "vc4-drm soc:gpu: failed to bind 3f902000.hdmi" in dmesg, followed by "master bind failed: -517". Without simplefb, there's no visual output at all; with simplefb, this gets used instead, and I'm back to square one.

I naively tried patching bcm2708_fb into the upstream kernel (a 1200-line patch, better than the six-figure patch that downstream is, or at least that's what I figured), but it is silently ignored (i.e. I can load it if compiling it as a module, but it does not actually initialize video with simplefb present, and gets me a blank output without simplefb). Did I do it wrong? (Probably, because if it were that simple, it would long be present in upstream. Why is it not?)

Any other hints?

Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2375
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Fast framebuffer in upstream kernel?

Wed Mar 21, 2018 4:26 pm

The firmware will add a simplefb node if both of the following are true:
1. There is no "display0" DT alias.
2. /soc/fb is absent or disabled.

If you want to use an alternative FB, create an alias "display0" pointing to it.

Return to “Linux Kernel”