]>
Commit | Line | Data |
---|---|---|
76a96d86 LA |
1 | Ion Memory Manager |
2 | ||
3 | Ion is a memory manager that allows for sharing of buffers via dma-buf. | |
4 | Ion allows for different types of allocation via an abstraction called | |
5 | a 'heap'. A heap represents a specific type of memory. Each heap has | |
6 | a different type. There can be multiple instances of the same heap | |
7 | type. | |
8 | ||
9 | Specific heap instances are tied to heap IDs. Heap IDs are not to be specified | |
10 | in the devicetree. | |
11 | ||
12 | Required properties for Ion | |
13 | ||
14 | - compatible: "linux,ion" PLUS a compatible property for the device | |
15 | ||
16 | All child nodes of a linux,ion node are interpreted as heaps | |
17 | ||
18 | required properties for heaps | |
19 | ||
20 | - compatible: compatible string for a heap type PLUS a compatible property | |
21 | for the specific instance of the heap. Current heap types | |
22 | -- linux,ion-heap-system | |
23 | -- linux,ion-heap-system-contig | |
24 | -- linux,ion-heap-carveout | |
25 | -- linux,ion-heap-chunk | |
26 | -- linux,ion-heap-dma | |
27 | -- linux,ion-heap-custom | |
28 | ||
29 | Optional properties | |
30 | - memory-region: A phandle to a memory region. Required for DMA heap type | |
31 | (see reserved-memory.txt for details on the reservation) | |
32 | ||
33 | Example: | |
34 | ||
35 | ion { | |
36 | compatbile = "hisilicon,ion", "linux,ion"; | |
37 | ||
38 | ion-system-heap { | |
39 | compatbile = "hisilicon,system-heap", "linux,ion-heap-system" | |
40 | }; | |
41 | ||
42 | ion-camera-region { | |
43 | compatible = "hisilicon,camera-heap", "linux,ion-heap-dma" | |
44 | memory-region = <&camera_region>; | |
45 | }; | |
46 | ||
47 | ion-fb-region { | |
48 | compatbile = "hisilicon,fb-heap", "linux,ion-heap-dma" | |
49 | memory-region = <&fb_region>; | |
50 | }; | |
51 | } |