soc/mediatek/common: Conditionally set up framebuffer

To save memory, only allocate and configure the framebuffer when display
output is required during boot.

This is achieved by:
1. Making the `framebuffer` memory region optional.
2. Guarding the framebuffer's uncached MMU configuration with a
   `display_init_required()` check.

This ensures the framebuffer is prepared only when needed, saving
memory on boot paths that do not require display.

BUG=b:319511268
BRANCH=none
TEST=emerge-rauru coreboot

Change-Id: I3808031160e421de7c21f585f4b79d42bfddccc4
Signed-off-by: Yidi Lin <yidilin@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89541
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Yidi Lin 2025-10-09 00:38:12 +08:00
commit 0ff213d711
3 changed files with 12 additions and 2 deletions

View file

@ -75,7 +75,7 @@ DECLARE_REGION(ttb)
DECLARE_OPTIONAL_REGION(ttb_subtables)
DECLARE_REGION(dma_coherent)
DECLARE_REGION(soc_registers)
DECLARE_REGION(framebuffer)
DECLARE_OPTIONAL_REGION(framebuffer)
DECLARE_REGION(pdpt)
DECLARE_OPTIONAL_REGION(opensbi)
DECLARE_OPTIONAL_REGION(bl31)