android: ion: add buffer protection
DRM video contents need protection of the decrypted video stream from
copying to insecure buffer. For the protection from copying, Exynos
SoC provides H/W based protection. Since H/W has limitation of
resources, the H/W needs the types of buffer protection, some special
limitation to alignments and limits to the memory pool to serve buffer
protection.
Every memory pool needs buffer protection should be specified in the
flattened device tree under 'reserved-memory' node like cma heaps and
carveout heaps. The heaps needs protection should have 'ion,secure'
boolean property that specifies buffers from the heap may needs buffer
protection. They also need 'ion,protection_id' which specifies the
types of buffer protection.
Buffers from the secure heaps are not protected unless users gives ION
ION_FLAG_PROTECTED flag. non-secure heaps just ignore the flag.
Change-Id: Ibef18c3fde7d628c2298abb95e71379c67cf7471
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>