From: Tobias Heider Subject: Re: Fix simplefb colours for BPP16 and BPP24 To: Paul Fertser Cc: patrick@openbsd.org, kettenis@openbsd.org, tech@openbsd.org Date: Tue, 12 Nov 2024 15:14:38 +0100 On Sun, Nov 03, 2024 at 03:15:27AM GMT, Paul Fertser wrote: > Hi, > > rasops defaults to BGR arrangements for all bit depths so the colour > offsets need to be specified explicitly for RGB formats. Also looks good. Anyone else interested in oking? > > diff --git sys/dev/fdt/simplefb.c sys/dev/fdt/simplefb.c > index 48c00d3d8..1c2cb7c2b 100644 > --- sys/dev/fdt/simplefb.c > +++ sys/dev/fdt/simplefb.c > @@ -47,10 +47,10 @@ struct simplefb_format { > * rasops defaults. > */ > const struct simplefb_format simplefb_formats[] = { > - { "r5g6b5", 16 }, > - { "x1r5g5b5", 15 }, > - { "a1r5g5b5", 15 }, > - { "r8g8b8", 24 }, > + { "r5g6b5", 16, 11, 5, 5, 6, 0, 5 }, > + { "x1r5g5b5", 15, 10, 5, 5, 5, 0, 5 }, > + { "a1r5g5b5", 15, 10, 5, 5, 5, 0, 5 }, > + { "r8g8b8", 24, 16, 8, 8, 8, 0, 8 }, > { "x8r8g8b8", 32, 16, 8, 8, 8, 0, 8 }, > { "a8r8g8b8", 32, 16, 8, 8, 8, 0, 8 }, > { "x8b8g8r8", 32 }, >