aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@foss.st.com>2021-11-15 16:32:22 +0100
committerPatrice Chotard <patrice.chotard@foss.st.com>2021-11-30 16:43:28 +0100
commit6cdeb323b89adb3649659d32a52eeaecb1e96086 (patch)
treecfac8ece2cd3961d8cc15a684e55daa811fe5984 /drivers
parent77debf61ef271957515de00a78ed5486c164f850 (diff)
downloadu-boot-6cdeb323b89adb3649659d32a52eeaecb1e96086.zip
u-boot-6cdeb323b89adb3649659d32a52eeaecb1e96086.tar.gz
u-boot-6cdeb323b89adb3649659d32a52eeaecb1e96086.tar.bz2
video: stm32: stm32_ltdc: align framebuffer on 2MB
Align the framebuffer size on MMU_SECTION_SIZE in kernel, = max 2MB for LPAE for armV7, to avoid issue with the simple frame buffer activation, when U-Boot add a reserved memory in the kernel device tree to preserve the splash screen until Linux driver initialization. See Linux documentation for details: Documentation/devicetree/bindings/display/simple-framebuffer.yaml Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/stm32/stm32_ltdc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/video/stm32/stm32_ltdc.c b/drivers/video/stm32/stm32_ltdc.c
index 65c882d..87e5fd5 100644
--- a/drivers/video/stm32/stm32_ltdc.c
+++ b/drivers/video/stm32/stm32_ltdc.c
@@ -459,7 +459,10 @@ static int stm32_ltdc_bind(struct udevice *dev)
uc_plat->size = CONFIG_VIDEO_STM32_MAX_XRES *
CONFIG_VIDEO_STM32_MAX_YRES *
(CONFIG_VIDEO_STM32_MAX_BPP >> 3);
- dev_dbg(dev, "frame buffer max size %d bytes\n", uc_plat->size);
+ /* align framebuffer on kernel MMU_SECTION_SIZE = max 2MB for LPAE */
+ uc_plat->align = SZ_2M;
+ dev_dbg(dev, "frame buffer max size %d bytes align %x\n",
+ uc_plat->size, uc_plat->align);
return 0;
}