[RFC][PATCH 1/3] dt-bindings: dma-buf: heaps: Describe CMA regions to be added to dmabuf heaps interface.

From
John Stultz <hidden>
Date
2019-10-25 22:50:21
Also in
dri-devel, lkml
Reply to
John Stultz, 2019-10-25
This binding specifies which CMA regions should be added to the
dmabuf heaps interface.

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Laura Abbott <redacted>
Cc: Benjamin Gaignard <redacted>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Liam Mark <redacted>
Cc: Pratik Patel <redacted>
Cc: Brian Starkey <Brian.Starkey@arm.com>
Cc: Andrew F. Davis <redacted>
Cc: Chenbo Feng <redacted>
Cc: Alistair Strachan <redacted>
Cc: Sandeep Patil <redacted>
Cc: Hridya Valsaraju <redacted>
Cc: <redacted>
Cc: <redacted>
Signed-off-by: John Stultz <redacted>
---
 .../bindings/dma/dmabuf-heap-cma.txt          | 31 +++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/dma/dmabuf-heap-cma.txt
diff --git a/Documentation/devicetree/bindings/dma/dmabuf-heap-cma.txt b/Documentation/devicetree/bindings/dma/dmabuf-heap-cma.txt
new file mode 100644
index 000000000000..bde7b1f1c269
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/dmabuf-heap-cma.txt
@@ -0,0 +1,31 @@
+* DMA-BUF CMA Heap
+
+Specifies a CMA region that should be added to the dma-buf heaps
+interface.
+
+Required properties:
+- compatible: Must be "dmabuf-heap-cma"
+- memory-region: phandle to a CMA reserved memory node
+
+Example:
+This example has a camera CMA node in reserved memory, which is then
+referenced by the dmabuf-heap-cma node.
+
+
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+		...
+		cma_camera: cma-camera {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x24C00000 0x0 0x4000000>;
+			reusable;
+		};
+		...
+	};
+
+       cma_heap {
+               compatible = "dmabuf-heap-cma";
+               memory-region = <&cma_camera>;
+        };
-- 
2.17.1
Thread (7 messages) 7 messages, 3 authors, last reply 2019-10-30
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help