0101-drm-vc4-Enable-VC4-modules-and-increase-CMA-size-wit.patch 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. From e426c18fa0b44ddf9c059e4c0288fbcb0c1b7acf Mon Sep 17 00:00:00 2001
  2. From: Phil Elwell <phil@raspberrypi.org>
  3. Date: Mon, 2 Nov 2015 17:07:33 +0000
  4. Subject: [PATCH] drm/vc4: Enable VC4 modules, and increase CMA size with
  5. overlay
  6. If using the overlay, be careful not to boot to GUI or run startx,
  7. or the Pi will almost hang, reporting stalls in kernel threads.
  8. ---
  9. arch/arm/boot/dts/overlays/README | 8 ++
  10. arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts | 95 ++++++++++++++++++++++
  11. arch/arm/configs/bcm2709_defconfig | 2 +
  12. arch/arm/configs/bcmrpi_defconfig | 2 +
  13. 4 files changed, 107 insertions(+)
  14. create mode 100644 arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts
  15. --- a/arch/arm/boot/dts/overlays/README
  16. +++ b/arch/arm/boot/dts/overlays/README
  17. @@ -601,6 +601,14 @@ Params: txd1_pin GPIO pi
  18. rxd1_pin GPIO pin for RXD1 (15, 33 or 41 - default 15)
  19. +Name: vc4-kms-v3d
  20. +Info: Enable Eric Anholt's DRM VC4 HDMI/HVS/V3D driver. Running startx or
  21. + booting to GUI while this overlay is in use will cause interesting
  22. + lockups.
  23. +Load: dtoverlay=vc4-kms-v3d
  24. +Params: <None>
  25. +
  26. +
  27. Name: vga666
  28. Info: Overlay for the Fen Logic VGA666 board
  29. This uses GPIOs 2-21 (so no I2C), and activates the output 2-3 seconds
  30. --- /dev/null
  31. +++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts
  32. @@ -0,0 +1,95 @@
  33. +/*
  34. + * vc4-kms-v3d-overlay.dts
  35. + */
  36. +
  37. +/dts-v1/;
  38. +/plugin/;
  39. +
  40. +#include "dt-bindings/clock/bcm2835.h"
  41. +#include "dt-bindings/gpio/gpio.h"
  42. +
  43. +/ {
  44. + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
  45. +
  46. + fragment@0 {
  47. + target = <&i2c2>;
  48. + __overlay__ {
  49. + status = "okay";
  50. + };
  51. + };
  52. +
  53. + fragment@1 {
  54. + target = <&cprman>;
  55. + __overlay__ {
  56. + status = "okay";
  57. + };
  58. + };
  59. +
  60. + fragment@2 {
  61. + target = <&fb>;
  62. + __overlay__ {
  63. + status = "disabled";
  64. + };
  65. + };
  66. +
  67. + fragment@3 {
  68. + target = <&soc>;
  69. + __overlay__ {
  70. + #address-cells = <1>;
  71. + #size-cells = <1>;
  72. +
  73. + pixelvalve@7e206000 {
  74. + compatible = "brcm,bcm2835-pixelvalve0";
  75. + reg = <0x7e206000 0x100>;
  76. + interrupts = <2 13>; /* pwa0 */
  77. + };
  78. +
  79. + pixelvalve@7e207000 {
  80. + compatible = "brcm,bcm2835-pixelvalve1";
  81. + reg = <0x7e207000 0x100>;
  82. + interrupts = <2 14>; /* pwa1 */
  83. + };
  84. +
  85. + hvs@7e400000 {
  86. + compatible = "brcm,bcm2835-hvs";
  87. + reg = <0x7e400000 0x6000>;
  88. + interrupts = <2 1>;
  89. + };
  90. +
  91. + pixelvalve@7e807000 {
  92. + compatible = "brcm,bcm2835-pixelvalve2";
  93. + reg = <0x7e807000 0x100>;
  94. + interrupts = <2 10>; /* pixelvalve */
  95. + };
  96. +
  97. + hdmi@7e902000 {
  98. + compatible = "brcm,bcm2835-hdmi";
  99. + reg = <0x7e902000 0x600>,
  100. + <0x7e808000 0x100>;
  101. + interrupts = <2 8>, <2 9>;
  102. + ddc = <&i2c2>;
  103. + hpd-gpio = <&gpio 46 GPIO_ACTIVE_HIGH>;
  104. + clocks = <&cprman BCM2835_PLLH_PIX>,
  105. + <&cprman BCM2835_CLOCK_HSM>;
  106. + clock-names = "pixel", "hdmi";
  107. + };
  108. +
  109. + v3d@7ec00000 {
  110. + compatible = "brcm,vc4-v3d";
  111. + reg = <0x7ec00000 0x1000>;
  112. + interrupts = <1 10>;
  113. + };
  114. +
  115. + gpu@7e4c0000 {
  116. + compatible = "brcm,bcm2835-vc4";
  117. + };
  118. + };
  119. + };
  120. +
  121. + fragment@4 {
  122. + target-path = "/chosen";
  123. + __overlay__ {
  124. + bootargs = "cma=256M@512M";
  125. + };
  126. + };
  127. +};
  128. --- a/arch/arm/configs/bcm2709_defconfig
  129. +++ b/arch/arm/configs/bcm2709_defconfig
  130. @@ -802,6 +802,8 @@ CONFIG_VIDEO_TW9903=m
  131. CONFIG_VIDEO_TW9906=m
  132. CONFIG_VIDEO_OV7640=m
  133. CONFIG_VIDEO_MT9V011=m
  134. +CONFIG_DRM=m
  135. +CONFIG_DRM_VC4=m
  136. CONFIG_FB=y
  137. CONFIG_FB_BCM2708=y
  138. CONFIG_FB_UDL=m
  139. --- a/arch/arm/configs/bcmrpi_defconfig
  140. +++ b/arch/arm/configs/bcmrpi_defconfig
  141. @@ -795,6 +795,8 @@ CONFIG_VIDEO_TW9903=m
  142. CONFIG_VIDEO_TW9906=m
  143. CONFIG_VIDEO_OV7640=m
  144. CONFIG_VIDEO_MT9V011=m
  145. +CONFIG_DRM=m
  146. +CONFIG_DRM_VC4=m
  147. CONFIG_FB=y
  148. CONFIG_FB_BCM2708=y
  149. CONFIG_FB_UDL=m