brcm2708: update linux 4.4 patches to latest version
[oweals/openwrt.git] / target / linux / brcm2708 / patches-4.4 / 0302-drm-vc4-Add-DT-parameters-to-control-CMA-usage.patch
1 From 4f7d976e703d5196ade9d27074ce4bb49c11bb52 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Sun, 24 Apr 2016 17:28:15 +0100
4 Subject: [PATCH] drm/vc4: Add DT parameters to control CMA usage
5
6 Example: dtoverlay=vc4-kms-v3d,cma-128
7
8 See: https://github.com/raspberrypi/linux/pull/1431
9
10 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
11 ---
12  arch/arm/boot/dts/overlays/README                  |  8 +++--
13  arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts | 36 ++++++++++++++++++++++
14  2 files changed, 42 insertions(+), 2 deletions(-)
15
16 --- a/arch/arm/boot/dts/overlays/README
17 +++ b/arch/arm/boot/dts/overlays/README
18 @@ -1023,8 +1023,12 @@ Name:   vc4-kms-v3d
19  Info:   Enable Eric Anholt's DRM VC4 HDMI/HVS/V3D driver. Running startx or
20          booting to GUI while this overlay is in use will cause interesting
21          lockups.
22 -Load:   dtoverlay=vc4-kms-v3d
23 -Params: <None>
24 +Load:   dtoverlay=vc4-kms-v3d,<param>
25 +Params: cma-256                 CMA is 256MB, 256MB-aligned (needs 1GB)
26 +        cma-192                 CMA is 192MB, 256MB-aligned (needs 1GB)
27 +        cma-128                 CMA is 128MB, 128MB-aligned
28 +        cma-96                  CMA is 96MB, 128MB-aligned
29 +        cma-64                  CMA is 64MB, 64MB-aligned
30  
31  
32  Name:   vga666
33 --- a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts
34 +++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts
35 @@ -94,4 +94,40 @@
36                         bootargs = "cma=256M@256M";
37                 };
38         };
39 +
40 +       fragment@5 {
41 +               target-path = "/chosen";
42 +               __dormant__ {
43 +                       bootargs = "cma=192M@256M";
44 +               };
45 +       };
46 +
47 +       fragment@6 {
48 +               target-path = "/chosen";
49 +               __dormant__ {
50 +                       bootargs = "cma=128M@128M";
51 +               };
52 +       };
53 +
54 +       fragment@7 {
55 +               target-path = "/chosen";
56 +               __dormant__ {
57 +                       bootargs = "cma=96M@128M";
58 +               };
59 +       };
60 +
61 +       fragment@8 {
62 +               target-path = "/chosen";
63 +               __dormant__ {
64 +                       bootargs = "cma=64M@64M";
65 +               };
66 +       };
67 +
68 +       __overrides__ {
69 +               cma-256 = <0>,"+4-5-6-7-8";
70 +               cma-192 = <0>,"-4+5-6-7-8";
71 +               cma-128 = <0>,"-4-5+6-7-8";
72 +               cma-96  = <0>,"-4-5-6+7-8";
73 +               cma-64  = <0>,"-4-5-6-7+8";
74 +       };
75  };