diff --git a/libgralloc/alloc_controller.cpp b/libgralloc/alloc_controller.cpp index bcae3818..46acd569 100644 --- a/libgralloc/alloc_controller.cpp +++ b/libgralloc/alloc_controller.cpp @@ -225,6 +225,9 @@ int IonController::allocate(alloc_data& data, int usage) ionFlags |= ION_HEAP(ION_IOMMU_HEAP_ID); } + if(usage & GRALLOC_USAGE_PRIVATE_CAMERA_HEAP) + ionFlags |= ION_HEAP(ION_CAMERA_HEAP_ID); + if(usage & GRALLOC_USAGE_PRIVATE_ADSP_HEAP) ionFlags |= ION_HEAP(ION_ADSP_HEAP_ID); diff --git a/libgralloc/gralloc_priv.h b/libgralloc/gralloc_priv.h index 3d4e4627..3187648b 100644 --- a/libgralloc/gralloc_priv.h +++ b/libgralloc/gralloc_priv.h @@ -68,12 +68,8 @@ enum { /* Close Caption displayed on an external display only */ GRALLOC_USAGE_PRIVATE_EXTERNAL_CC = 0x00200000, - /* Use this flag to request content protected buffers. Please note - * that this flag is different from the GRALLOC_USAGE_PROTECTED flag - * which can be used for buffers that are not secured for DRM - * but still need to be protected from screen captures - */ - GRALLOC_USAGE_PRIVATE_CP_BUFFER = 0x00400000, + /* CAMERA heap is a carveout heap for camera, is not secured*/ + GRALLOC_USAGE_PRIVATE_CAMERA_HEAP = 0x00400000, }; enum {