Jonathon Hall has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/83476?usp=email )
Change subject: bootsplash: Increase heap from 1 MB to 4 MB when bootsplash is enabled ......................................................................
bootsplash: Increase heap from 1 MB to 4 MB when bootsplash is enabled
Since commit 1d029b40 ("lib/jpeg: Replace decoder with Wuffs' implementation"), a relatively large heap allocation is needed to decode many JPEGs for use as work area. The prior decoder did not need this, but also had many limitations in the JPEGs it could decode.
A 1024x768 non-progressive JPEG used in Heads needs 1179648 bytes of work area; about 1.2 MB. While the work area will also depend on the subsampling of each channel, it's generally proportional to the image size.
Increasing the heap size to 4 MB when bootsplash is enabled should be enough to decode bootsplashes up to 1920x1080 with some headroom.
Change-Id: Ia4348d39effbc16c1b42ab01bcf1e4ec5d652fa9 Signed-off-by: Jonathon Hall jonathon.hall@puri.sm --- M src/device/Kconfig 1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/83476/1
diff --git a/src/device/Kconfig b/src/device/Kconfig index 243e23e..4dd03eb 100644 --- a/src/device/Kconfig +++ b/src/device/Kconfig @@ -501,6 +501,11 @@ image in the 'General' section or add it manually to CBFS, using, for example, cbfstool.
+# The bootsplash JPEG decoder requires heap space approximately proportional to +# the image size. This usually needs a larger heap. +config HEAP_SIZE + default 0x400000 if BOOTSPLASH + config LINEAR_FRAMEBUFFER_MAX_WIDTH int "Maximum width in pixels" depends on LINEAR_FRAMEBUFFER && MAINBOARD_USE_LIBGFXINIT