gralloc : Allow support for both Widevine level-1 and level-3
MM HEAP will be used only for Widevine Level-1 secure playback.
Since Video component assures of using MM HEAP flags only for
WV Level-1 and Level-3 will not be marked with MM HEAP it is
possible to allow supporting both of these protection levels
co existing in a device.
Change-Id: I153eeebf20bdab0c2ce930a5a124369a2b3249a6
CRs-fixed: 562601
diff --git a/libgralloc/alloc_controller.cpp b/libgralloc/alloc_controller.cpp
index 9af45e2..98047e4 100644
--- a/libgralloc/alloc_controller.cpp
+++ b/libgralloc/alloc_controller.cpp
@@ -184,12 +184,6 @@
IonController::IonController()
{
mIonAlloc = new IonAlloc();
- mUseTZProtection = false;
- char property[PROPERTY_VALUE_MAX];
- if ((property_get("persist.gralloc.cp.level3", property, NULL) <= 0) ||
- (atoi(property) != 1)) {
- mUseTZProtection = true;
- }
}
int IonController::allocate(alloc_data& data, int usage)
@@ -210,7 +204,7 @@
ionFlags |= ION_HEAP(ION_IOMMU_HEAP_ID);
if(usage & GRALLOC_USAGE_PROTECTED) {
- if ((mUseTZProtection) && (usage & GRALLOC_USAGE_PRIVATE_MM_HEAP)) {
+ if (usage & GRALLOC_USAGE_PRIVATE_MM_HEAP) {
ionFlags |= ION_HEAP(ION_CP_MM_HEAP_ID);
ionFlags |= ION_SECURE;
} else {