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
This commit is contained in:
@@ -184,12 +184,6 @@ IAllocController* IAllocController::getInstance(void)
|
||||
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 @@ int IonController::allocate(alloc_data& data, int usage)
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user