OSDN Git Service

ion: Add ion_dma_buf_is_secure() to query buffer type
authorJordan Crouse <jcrouse@codeaurora.org>
Thu, 4 May 2017 19:48:21 +0000 (13:48 -0600)
committerJordan Crouse <jcrouse@codeaurora.org>
Thu, 4 May 2017 20:07:06 +0000 (14:07 -0600)
commit90dbea373e0dac7d633ab2fdd906f63c1121ab25
treebaf189539f21aeeb5118483d1e61ccb0c5ee7dc7
parentb2fd7c67bc61c3ed770d2af2ba8c83eac88d7022
ion: Add ion_dma_buf_is_secure() to query buffer type

Outside clients (such as the display or GPU) may import a dmabuf
and need to figure out if it is secure so that it can be handled
accordingly. In an ideal world this would be part of the generic
dma-buf structure but until then we can assume that the only outside
source of dmabuf-ified secure buffers is Ion so add a function to
directly query the status of the buffer from Ion.

ion_dma_buf_is_secure() returns true if the dmabuf was created
by Ion and was created from a secure heap.

Change-Id: Ic0dedbad5e5a4464c6948f05bb7e0e3e94cd4cc2
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
drivers/staging/android/ion/ion.c
drivers/staging/android/ion/ion.h