Skip to content

Commit 8528570

Browse files
Phil Elwellpopcornmix
Phil Elwell
authored andcommitted
drm/vc4: Add DT parameters to control CMA usage
Example: dtoverlay=vc4-kms-v3d,cma-128 See: #1431 Signed-off-by: Phil Elwell <[email protected]>
1 parent e85d2a1 commit 8528570

File tree

2 files changed

+42
-2
lines changed

2 files changed

+42
-2
lines changed

arch/arm/boot/dts/overlays/README

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,8 +1023,12 @@ Name: vc4-kms-v3d
10231023
Info: Enable Eric Anholt's DRM VC4 HDMI/HVS/V3D driver. Running startx or
10241024
booting to GUI while this overlay is in use will cause interesting
10251025
lockups.
1026-
Load: dtoverlay=vc4-kms-v3d
1027-
Params: <None>
1026+
Load: dtoverlay=vc4-kms-v3d,<param>
1027+
Params: cma-256 CMA is 256MB, 256MB-aligned (needs 1GB)
1028+
cma-192 CMA is 192MB, 256MB-aligned (needs 1GB)
1029+
cma-128 CMA is 128MB, 128MB-aligned
1030+
cma-96 CMA is 96MB, 128MB-aligned
1031+
cma-64 CMA is 64MB, 64MB-aligned
10281032

10291033

10301034
Name: vga666

arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,40 @@
9494
bootargs = "cma=256M@256M";
9595
};
9696
};
97+
98+
fragment@5 {
99+
target-path = "/chosen";
100+
__dormant__ {
101+
bootargs = "cma=192M@256M";
102+
};
103+
};
104+
105+
fragment@6 {
106+
target-path = "/chosen";
107+
__dormant__ {
108+
bootargs = "cma=128M@128M";
109+
};
110+
};
111+
112+
fragment@7 {
113+
target-path = "/chosen";
114+
__dormant__ {
115+
bootargs = "cma=96M@128M";
116+
};
117+
};
118+
119+
fragment@8 {
120+
target-path = "/chosen";
121+
__dormant__ {
122+
bootargs = "cma=64M@64M";
123+
};
124+
};
125+
126+
__overrides__ {
127+
cma-256 = <0>,"+4-5-6-7-8";
128+
cma-192 = <0>,"-4+5-6-7-8";
129+
cma-128 = <0>,"-4-5+6-7-8";
130+
cma-96 = <0>,"-4-5-6+7-8";
131+
cma-64 = <0>,"-4-5-6-7+8";
132+
};
97133
};

0 commit comments

Comments
 (0)