]> git.lizzy.rs Git - plan9front.git/commitdiff
bcm: change color chan to RGB24 (thanks p.kosyh)
authorcinap_lenrek <cinap_lenrek@felloff.net>
Sun, 28 Feb 2021 12:31:49 +0000 (13:31 +0100)
committercinap_lenrek <cinap_lenrek@felloff.net>
Sun, 28 Feb 2021 12:31:49 +0000 (13:31 +0100)
p.kosyh writes:

Hello!  I finally bought rpi4 4Gb specially for 9front. It seems,
that default bpp of framebuffer is 16.  I changed it to 24 (via
cmdline.txt and config.txt) and found, that rendering is much faster!
(May be due removing overheads in 16->24 conversions?)

But on rpi4 r and b channels are swapped.  So, i changed BGR24 to
RGB24 in bcm/screen.c and now it works fine!

sys/src/9/bcm/screen.c

index a103f45bae5a7e04bcfd8a1a7512e7495bc2d853..8761682fc644c384d95dd4486ee919ab5f2d7697 100644 (file)
@@ -139,7 +139,7 @@ screeninit(void)
                chan = RGB16;
                break;
        case 24:
-               chan = BGR24;
+               chan = RGB24;
                break;
        case 32:
                chan = XRGB32;