Advertisement
Guest User

Untitled

a guest
Jul 30th, 2013
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. diff --git a/libgralloc/alloc_controller.cpp b/libgralloc/alloc_controller.cpp
  2. index c6709b4..daf95d3 100644
  3. --- a/libgralloc/alloc_controller.cpp
  4. +++ b/libgralloc/alloc_controller.cpp
  5. @@ -212,7 +212,11 @@ int IonController::allocate(alloc_data& data, int usage)
  6. ALOGW("GRALLOC_USAGE_PRIVATE_MM_HEAP \
  7. cannot be used as an insecure heap!\
  8. trying to use IOMMU instead !!");
  9. - ionFlags |= ION_HEAP(ION_IOMMU_HEAP_ID);
  10. + if (mUseTZProtection) {
  11. + ionFlags |= ION_HEAP(ION_CP_MM_HEAP_ID);
  12. + } else {
  13. + ionFlags |= ION_HEAP(ION_IOMMU_HEAP_ID);
  14. + }
  15. }
  16.  
  17. if(usage & GRALLOC_USAGE_PRIVATE_CAMERA_HEAP)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement