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:
Prabhanjan Kandula
2013-10-24 16:32:51 +05:30
parent 67b7322ea3
commit e8f4becdf3
2 changed files with 1 additions and 8 deletions

View File

@@ -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 {