diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2015-04-23 17:01:50 +0200 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2015-04-23 17:18:46 +0200 |
commit | f51c0c368c45a55f3eb41b1fa4206b87165f8661 (patch) | |
tree | ef421918ef0f81486db606222441b7d885d98e8b /drivers/video | |
parent | 156c0200a96611e35fc4e2bd82e238676e2b95fb (diff) |
video: dcu: make sure memory size aligns to section size
Align the reported memory size to 1MiB, which is the section size
in the Linux memory managment system. This avoids triggering an
issue which leads to freeze the Linux kernel very early:
http://thread.gmane.org/gmane.linux.ports.arm.kernel/408378
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fsl_dcu_fb.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/video/fsl_dcu_fb.c b/drivers/video/fsl_dcu_fb.c index 37f0f51c5b2..4ee823e1d32 100644 --- a/drivers/video/fsl_dcu_fb.c +++ b/drivers/video/fsl_dcu_fb.c @@ -445,6 +445,13 @@ int fsl_dcu_fixedfb_setup(void *blob) start = gd->bd->bi_dram[0].start; size = gd->fb_base - gd->bd->bi_dram[0].start; + + /* + * Align size on section size (1 MiB). The Linux kernel would crash + * otherwise, this seems to be a limitation/bug of the Linux + * kernel currently (Linux ~4.0) + */ + size &= 0xfff00000; ret = fdt_fixup_memory_banks(blob, &start, &size, 1); if (ret) { eprintf("Cannot setup fb: Error reserving memory\n"); |