[PATCH] video: simplefb: Map framebuffer region on probe on ARM64
Luca Weiss
luca.weiss at fairphone.com
Wed Mar 18 16:07:17 CET 2026
The framebuffer buffer might not be mapped on some devices.
This is #ifdef'ed for ARM64 since mmu_map_region() is not defined for
any other architecture.
Signed-off-by: Luca Weiss <luca.weiss at fairphone.com>
---
Map 0x1000 extra due to unknown reason, but otherwise it's not enough
and we still get a "Synchronous Abort" when drawing at the bottom of the
framebuffer.
For milos-fairphone-fp6 the framebuffer is reg=0xe3940000
size=0xa932c0 (2484*1116*4).
When just calling mmu_map_region with plat->size, then it's crashing at
0xe43d3000 even though everything up to 0xe43d32c0 should be mapped.
With size+0x800 (or less) it was also still crashing, only size+0x1000
then worked.
Possible I just don't know enough about memory mapping things, so
suggestions welcome! :)
---
drivers/video/simplefb.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c
index 8d0772d4e51..e144fde697b 100644
--- a/drivers/video/simplefb.c
+++ b/drivers/video/simplefb.c
@@ -9,6 +9,7 @@
#include <log.h>
#include <video.h>
#include <asm/global_data.h>
+#include <asm/system.h>
static int simple_video_probe(struct udevice *dev)
{
@@ -37,6 +38,11 @@ static int simple_video_probe(struct udevice *dev)
plat->base = base;
plat->size = size;
+#ifdef CONFIG_ARM64
+ /* The framebuffer buffer might not be mapped on some devices */
+ mmu_map_region((phys_addr_t)plat->base, (phys_addr_t)plat->size + 0x1000, false);
+#endif
+
video_set_flush_dcache(dev, true);
debug("%s: Query resolution...\n", __func__);
---
base-commit: ba7bf918dafcd093ad733b07ba490baeb20cf5da
change-id: 20260318-simplefb-map-abb9dba0eed1
Best regards,
--
Luca Weiss <luca.weiss at fairphone.com>
More information about the U-Boot
mailing list