public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Michael Trimarchi <michael@amarulasolutions.com>
To: u-boot@lists.denx.de
Subject: [PATCH 2/2] video: meson: Use reserving memory function without kernel linear mapping
Date: Tue, 25 Feb 2020 06:10:21 +0100	[thread overview]
Message-ID: <20200225051021.15311-3-michael@amarulasolutions.com> (raw)
In-Reply-To: <20200225051021.15311-1-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 <michael@amarulasolutions.com>
---
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;
-- 
2.17.1

  parent reply	other threads:[~2020-02-25  5:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-25  5:10 [PATCH 0/2] Update reserved memory for simple framebuffer Michael Trimarchi
2020-02-25  5:10 ` [PATCH 1/2] common: fdt: Add a function for reserving memory without kernel linear mapping Michael Trimarchi
2020-02-26 15:33   ` Simon Glass
2020-02-29 10:44     ` Michael Nazzareno Trimarchi
2022-04-14 16:17   ` Michael Nazzareno Trimarchi
2020-02-25  5:10 ` Michael Trimarchi [this message]
2020-02-26 15:33   ` [PATCH 2/2] video: meson: Use reserving memory function " Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200225051021.15311-3-michael@amarulasolutions.com \
    --to=michael@amarulasolutions.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox