Message ID | 20241004084124.416695-1-pbrobinson@gmail.com |
---|---|
State | New |
Delegated to: | Peter Robinson |
Headers | show |
Series | board: rpi: Pass CMA through from firmware DT | expand |
On 4/10/24 10:41, Peter Robinson 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@gmail.com> Acked-by: Matthias Brugger <mbrugger@suse.com> > --- > board/raspberrypi/rpi/rpi.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c > index ab5ea85cf9f..d4dbd96bc96 100644 > --- a/board/raspberrypi/rpi/rpi.c > +++ b/board/raspberrypi/rpi/rpi.c > @@ -540,7 +540,7 @@ 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 */ > @@ -561,6 +561,9 @@ void update_fdt_from_fw(void *fdt, void *fw_fdt) > > /* address of the PHY device as provided by the firmware */ > copy_property(fdt, fw_fdt, "ethernet0/mdio@e14/ethernet-phy@1", "reg"); > + > + /* copy the CMA memory setting from the firmware DT to linux */ > + copy_property(fdt, fw_fdt, "cma", "size"); > } > > int ft_board_setup(void *blob, struct bd_info *bd)
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index ab5ea85cf9f..d4dbd96bc96 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -540,7 +540,7 @@ 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 */ @@ -561,6 +561,9 @@ void update_fdt_from_fw(void *fdt, void *fw_fdt) /* address of the PHY device as provided by the firmware */ copy_property(fdt, fw_fdt, "ethernet0/mdio@e14/ethernet-phy@1", "reg"); + + /* copy the CMA memory setting from the firmware DT to linux */ + copy_property(fdt, fw_fdt, "cma", "size"); } int ft_board_setup(void *blob, struct bd_info *bd)
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@gmail.com> --- board/raspberrypi/rpi/rpi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)