[PATCH] handle 10-bpc framebuffer layouts

Pip Cet pipcet at gmail.com
Sat Jun 5 13:15:02 PDT 2021


I'm playing with barebox on an Apple M1-based MacBook Pro that uses
the (new-ish) x2r10g10b10 framebuffer layout. The attached patch is
sufficient to get a white-on-black prompt rather than black-on-black
text.

(I can't actually use the prompt yet, as there's no keyboard driver,
but it's a start.)

I'm aware that this code isn't as accurate as it could be (the LSBs of
the 10-bit color are always 00), but I think it's worth it to keep
this code (relatively) simple, and the difference is unlikely to ever
be apparent to anyone. Please let me know if you'd prefer a version
which does the (r * 0x101) >> (16 - length) thing or any other
version.

Thanks!
Pip
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-graphic_utils.c-handle-10-bpc-framebuffer-layouts.patch
Type: text/x-patch
Size: 1137 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/barebox/attachments/20210605/19e74610/attachment.bin>


More information about the barebox mailing list