From patchwork Tue Feb 25 05:10:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Nazzareno Trimarchi X-Patchwork-Id: 236787 List-Id: U-Boot discussion From: michael at amarulasolutions.com (Michael Trimarchi) Date: Tue, 25 Feb 2020 06:10:21 +0100 Subject: [PATCH 2/2] video: meson: Use reserving memory function without kernel linear mapping In-Reply-To: <20200225051021.15311-1-michael@amarulasolutions.com> References: <20200225051021.15311-1-michael@amarulasolutions.com> Message-ID: <20200225051021.15311-3-michael@amarulasolutions.com> Memory reserved for the simple framebuffer should not be used and part of memory linear mapping. See https://patchwork.kernel.org/patch/10486131/ for more detailed background information and discussion. Signed-off-by: Michael Trimarchi --- Changes RFC -> v1: - Fix compilation issue on RFC - change node name from display_reserved to display-reserved --- drivers/video/meson/meson_vpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/video/meson/meson_vpu.c b/drivers/video/meson/meson_vpu.c index 4eb66398d0..5bfad05d75 100644 --- a/drivers/video/meson/meson_vpu.c +++ b/drivers/video/meson/meson_vpu.c @@ -173,9 +173,9 @@ static void meson_vpu_setup_simplefb(void *fdt) * at the end of the RAM and we strip this portion from the kernel * allowed region */ - mem_start = gd->bd->bi_dram[0].start; - mem_size = gd->bd->bi_dram[0].size - meson_fb.fb_size; - ret = fdt_fixup_memory_banks(fdt, &mem_start, &mem_size, 1); + mem_start = meson_fb.base; + mem_size = meson_fb.fb_size; + ret = fdt_fixup_reserved_memory(fdt, "display-reserved", &mem_start, &mem_size); if (ret) { eprintf("Cannot setup simplefb: Error reserving memory\n"); return;