Skip to content

Commit 8605386

Browse files
committed
galp5 : change CONFIG_HEAP_SIZE to 0x400000 copy patch from patches/coreboot-24.02.01/0002-increase_heap_from1mb_to4mb_when_bootpslash_enabled.patch to patches/coreboot-system76-unrelease. Others might be needed, see patches/coreboot-24.02.01/*
Signed-off-by: Thierry Laurion <insurgo@riseup.net>
1 parent cc99c5e commit 8605386

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

config/coreboot-galp5.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ CONFIG_BOOT_DEVICE_SPI_FLASH=y
732732
CONFIG_BOOT_DEVICE_MEMORY_MAPPED=y
733733
CONFIG_BOOT_DEVICE_SUPPORTS_WRITES=y
734734
CONFIG_RTC=y
735-
CONFIG_HEAP_SIZE=0x100000
735+
CONFIG_HEAP_SIZE=0x400000
736736

737737
#
738738
# Console
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
From 00d695849a5fb503d87203e3515f761fa8dac850 Mon Sep 17 00:00:00 2001
2+
From: Jonathon Hall <jonathon.hall@puri.sm>
3+
Date: Mon, 15 Jul 2024 16:37:40 -0400
4+
Subject: [PATCH] bootsplash: Increase heap from 1 MB to 4 MB when bootsplash
5+
is enabled
6+
7+
Since commit 1d029b40c9de ("lib/jpeg: Replace decoder with Wuffs'
8+
implementation"), a relatively large heap allocation is needed to
9+
decode many JPEGs for use as work area. The prior decoder did not need
10+
this, but also had many limitations in the JPEGs it could decode.
11+
12+
A 1024x768 non-progressive JPEG used in Heads needs 1179648 bytes of
13+
work area; about 1.2 MB. While the work area will also depend on the
14+
subsampling of each channel, it's generally proportional to the image
15+
size.
16+
17+
Increasing the heap size to 4 MB when bootsplash is enabled should be
18+
enough to decode bootsplashes up to 1920x1080 with some headroom.
19+
20+
Change-Id: Ia4348d39effbc16c1b42ab01bcf1e4ec5d652fa9
21+
Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
22+
---
23+
src/device/Kconfig | 5 +++++
24+
1 file changed, 5 insertions(+)
25+
26+
diff --git a/src/device/Kconfig b/src/device/Kconfig
27+
index 243e23e52a..4dd03eba21 100644
28+
--- a/src/device/Kconfig
29+
+++ b/src/device/Kconfig
30+
@@ -501,6 +501,11 @@ config BOOTSPLASH
31+
image in the 'General' section or add it manually to CBFS, using,
32+
for example, cbfstool.
33+
34+
+# The bootsplash JPEG decoder requires heap space approximately proportional to
35+
+# the image size. This usually needs a larger heap.
36+
+config HEAP_SIZE
37+
+ default 0x400000 if BOOTSPLASH
38+
+
39+
config LINEAR_FRAMEBUFFER_MAX_WIDTH
40+
int "Maximum width in pixels"
41+
depends on LINEAR_FRAMEBUFFER && MAINBOARD_USE_LIBGFXINIT
42+
--
43+
2.39.2
44+

0 commit comments

Comments
 (0)