[PATCH v2] board: rpi: Pass CMA through from firmware DT
Peter Robinson
pbrobinson at gmail.com
Mon Oct 14 14:37:26 CEST 2024
On Sun, 13 Oct 2024 at 20:34, Simon Glass <sjg at chromium.org> wrote:
>
> On Fri, 11 Oct 2024 at 11:09, Peter Robinson <pbrobinson at gmail.com> wrote:
> >
> > For a lot of usecases, such as display, camera, media
> > the Raspberry Pi needs a lot more CMA than distros
> > configure as default so we should pass this parameter
> > through so things work as expected. Fix a spelling
> > mistake while we're at it.
> >
> > Signed-off-by: Peter Robinson <pbrobinson at gmail.com>
> > ---
> >
> > v2: Update the cma string
> >
> > board/raspberrypi/rpi/rpi.c | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
>
> Reviewed-by: Simon Glass <sjg at chromium.org>
>
> > diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
> > index ab5ea85cf9f..dd5a318d239 100644
> > --- a/board/raspberrypi/rpi/rpi.c
> > +++ b/board/raspberrypi/rpi/rpi.c
> > @@ -540,12 +540,15 @@ void update_fdt_from_fw(void *fdt, void *fw_fdt)
> > if (fdt == fw_fdt)
> > return;
> >
> > - /* The firmware provides a more precie model; so copy that */
> > + /* The firmware provides a more precise model; so copy that */
> > copy_property(fdt, fw_fdt, "/", "model");
> >
> > /* memory reserve as suggested by the firmware */
> > copy_property(fdt, fw_fdt, "/", "memreserve");
> >
> > + /* copy the CMA memory setting from the firmware DT to linux */
> > + copy_property(fdt, fw_fdt, "/reserved-memory/linux,cma", "size");
>
> Does this need / have nodes pointing to it from elsewhere in the tree?
Yes! It doesn't work without the /, I am planning on looking at this
some more but this fixes the issue at hand. Using the fdt cmd from the
command prompt needs it as well.
> > +
> > /* Adjust dma-ranges for the SD card and PCI bus as they can depend on
> > * the SoC revision
> > */
> > --
> > 2.47.0
> >
>
> Regards,
> Simon
More information about the U-Boot
mailing list