Patchwork [2/2] kernel/dma: Default to 64 MiB of contiguous memory on Raspberry Pi 3

login
register
mail settings
Submitter Thomas Zimmermann
Date March 4, 2019, 11:52 a.m.
Message ID <20190304115255.2088-3-tzimmermann@suse.de>
Download mbox | patch
Permalink /patch/742263/
State New
Headers show

Comments

Thomas Zimmermann - March 4, 2019, 11:52 a.m.
By default, reserve 64 MiB of contiguous memory for use with the Raspberry
Pi 3's VideoCore IV graphics unit.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 kernel/dma/contiguous.c | 4 ++++
 1 file changed, 4 insertions(+)

Patch

diff --git a/kernel/dma/contiguous.c b/kernel/dma/contiguous.c
index 5bbb7a618a2d..c7594706efd6 100644
--- a/kernel/dma/contiguous.c
+++ b/kernel/dma/contiguous.c
@@ -55,6 +55,10 @@  struct cma_default {
 /* CMA defaults for various devices, keep this sorted by .machine_name.
  */
 static const struct cma_default __initdata cma_machine_defaults[] = {
+	/* Reserve 64 MiB for the VC4 graphics unit on Raspberry Pi 3. This
+	 * should be enough memory to run fbcon and a simple desktop. */
+	DECLARE_CMA_MACHINE_DEFAULT("Raspberry Pi 3 Model B Rev 1.2",
+				    64 * 1024 * 1024, 0, 0)
 };
 
 static int __init cmp_machine_name(const void *key, const void *elt)