Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50b9a890 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge changes I935f34a1,Ibfd79306,I51a46709,Ic0087cd8 into msm-next

* changes:
  defconfig: sdm855: enable ION
  ion: add ion changes from msm-4.9 into msm-next
  Revert "staging: android: ion: Remove crufty cache support"
  Revert "staging: android: ion: Rework heap registration"
parents 7c0f1114 7695dee9
Loading
Loading
Loading
Loading
+59 −0
Original line number Diff line number Diff line
ION Memory Manager (ION)

ION is a memory manager that allows for sharing of buffers between different
processes and between user space and kernel space. ION manages different
memory spaces by separating the memory spaces into "heaps".

Required properties for Ion

- compatible: "qcom,msm-ion"


All child nodes of a qcom,msm-ion node are interpreted as Ion heap
configurations.

Required properties for Ion heaps

- reg: The ID of the ION heap.
- qcom,ion-heap-type: The heap type to use for this heap. Should be one of
  the following:
    - "SYSTEM"
    - "CARVEOUT"
    - "DMA"
    - "HYP_CMA"
    - "SYSTEM_SECURE"
    - "SECURE_DMA"

Optional properties for Ion heaps

- memory-region: phandle to memory region associated with heap.

Example:
	qcom,ion {
                 compatible = "qcom,msm-ion";
                 #address-cells = <1>;
                 #size-cells = <0>;

                 system_heap: qcom,ion-heap@25 {
                        reg = <25>;
                        qcom,ion-heap-type = "SYSTEM";
                 };

                 qcom,ion-heap@22 { /* ADSP HEAP */
                        reg = <22>;
                        memory-region = <&adsp_mem>;
                        qcom,ion-heap-type = "DMA";
                 };

                 qcom,ion-heap@10 { /* SECURE DISPLAY HEAP */
                        reg = <10>;
                        memory-region = <&secure_display_memory>;
                        qcom,ion-heap-type = "HYP_CMA";
                 };

                 qcom,ion-heap@9 {
                        reg = <9>;
                        qcom,ion-heap-type = "SYSTEM_SECURE";
                 };

        };
+1 −0
Original line number Diff line number Diff line
@@ -314,6 +314,7 @@ CONFIG_DMADEVICES=y
CONFIG_UIO=y
CONFIG_STAGING=y
CONFIG_ASHMEM=y
CONFIG_ION=y
CONFIG_MSM_GCC_SDM855=y
CONFIG_MSM_NPUCC_SDM855=y
CONFIG_MSM_VIDEOCC_SDM855=y
+1 −0
Original line number Diff line number Diff line
@@ -324,6 +324,7 @@ CONFIG_DMADEVICES=y
CONFIG_UIO=y
CONFIG_STAGING=y
CONFIG_ASHMEM=y
CONFIG_ION=y
CONFIG_MSM_GCC_SDM855=y
CONFIG_MSM_NPUCC_SDM855=y
CONFIG_MSM_VIDEOCC_SDM855=y
+1 −33
Original line number Diff line number Diff line
@@ -3,42 +3,10 @@ menuconfig ION
	depends on HAVE_MEMBLOCK && HAS_DMA && MMU
	select GENERIC_ALLOCATOR
	select DMA_SHARED_BUFFER
	select MSM_SECURE_BUFFER
	---help---
	  Chose this option to enable the ION Memory Manager,
	  used by Android to efficiently allocate buffers
	  from userspace that can be shared between drivers.
	  If you're not using Android its probably safe to
	  say N here.

config ION_SYSTEM_HEAP
	bool "Ion system heap"
	depends on ION
	help
	  Choose this option to enable the Ion system heap. The system heap
	  is backed by pages from the buddy allocator. If in doubt, say Y.

config ION_CARVEOUT_HEAP
	bool "Ion carveout heap support"
	depends on ION
	help
	  Choose this option to enable carveout heaps with Ion. Carveout heaps
	  are backed by memory reserved from the system. Allocation times are
	  typically faster at the cost of memory not being used. Unless you
	  know your system has these regions, you should say N here.

config ION_CHUNK_HEAP
	bool "Ion chunk heap support"
	depends on ION
	help
          Choose this option to enable chunk heaps with Ion. This heap is
	  similar in function the carveout heap but memory is broken down
	  into smaller chunk sizes, typically corresponding to a TLB size.
	  Unless you know your system has these regions, you should say N here.

config ION_CMA_HEAP
	bool "Ion CMA heap support"
	depends on ION && CMA
	help
	  Choose this option to enable CMA heaps with Ion. This heap is backed
	  by the Contiguous Memory Allocator (CMA). If your system has these
	  regions, you should say Y here.
+5 −5
Original line number Diff line number Diff line
obj-$(CONFIG_ION) +=	ion.o ion-ioctl.o ion_heap.o
obj-$(CONFIG_ION_SYSTEM_HEAP) += ion_system_heap.o ion_page_pool.o
obj-$(CONFIG_ION_CARVEOUT_HEAP) += ion_carveout_heap.o
obj-$(CONFIG_ION_CHUNK_HEAP) += ion_chunk_heap.o
obj-$(CONFIG_ION_CMA_HEAP) += ion_cma_heap.o
obj-$(CONFIG_ION) +=	ion.o ion-ioctl.o ion_heap.o \
			ion_page_pool.o ion_system_heap.o \
			ion_carveout_heap.o ion_chunk_heap.o \
			ion_system_secure_heap.o ion_cma_heap.o \
			msm/
Loading