Skip to content

Conversation

6by9
Copy link
Contributor

@6by9 6by9 commented Oct 13, 2025

There were various points where the loader was using uninitialised data, had the potential to run off the end of an array, or was handling core functions incorrectly. Fix these up.

(It still goes quite badly wrong if the framebuffer isn't 16bpp)

6by9 added 2 commits October 20, 2025 19:39
There were various points where the loader was using uninitialised
data, had the potential to run off the end of an array, or was
handling core functions incorrectly. Fix these up.

Also handle 24bpp and 32bpp framebuffers.

Signed-off-by: Dave Stevenson <[email protected]>
The mappings are the reverse of r8g8b8 and r5g6b5 respectively

Signed-off-by: Dave Stevenson <[email protected]>
@6by9 6by9 force-pushed the rpi-6.12.y-fbcon-logo branch from 518ce2a to 493d19e Compare October 20, 2025 18:40
@6by9
Copy link
Contributor Author

6by9 commented Oct 20, 2025

Now fixed up to work with 24 and 32bpp framebuffer devices.

Amusingly Pi5 with framebuffer_depth=24 appears to have set the hardware to BGR888, but always sends r8g8b8 to simple-framebuffer. The code appears to look at framebuffer_swap, but somehow it isn't applied. (I ought to look at the dlists).

framebuffer_depth=16 ignores framebuffer_swap totally and always sets r5g6b5.

Both are semi-understandable as simple-framebuffer didn't have the BGR variants defined. I've added them, so we probably want to update the firmware to make use of this.

@6by9 6by9 merged commit be50b70 into raspberrypi:rpi-6.12.y Oct 21, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants