0305-drm-vc4-Add-DT-parameters-to-control-CMA-usage.patch 2.0 KB

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