Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11792144 authored by Liam Mark's avatar Liam Mark
Browse files

staging: android: ion: Add support for SPSS vmids



Ensure ION secure heaps support allocating secure memory
from VMID_CP_SPSS_SP, VMID_CP_SPSS_SP_SHARED and VMID_CP_SPSS_HLOS_SHARED
vmids.

Change-Id: Id4c48a0a55394187e424b263b01b798ccf28655e
Signed-off-by: default avatarLiam Mark <lmark@codeaurora.org>
parent b2bdf7dc
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -27,7 +27,10 @@ bool is_secure_vmid_valid(int vmid)
		vmid == VMID_CP_CAMERA ||
		vmid == VMID_CP_SEC_DISPLAY ||
		vmid == VMID_CP_APP ||
		vmid == VMID_CP_CAMERA_PREVIEW);
		vmid == VMID_CP_CAMERA_PREVIEW ||
		vmid == VMID_CP_SPSS_SP ||
		vmid == VMID_CP_SPSS_SP_SHARED ||
		vmid == VMID_CP_SPSS_HLOS_SHARED);
}

int get_secure_vmid(unsigned long flags)
@@ -48,6 +51,12 @@ int get_secure_vmid(unsigned long flags)
		return VMID_CP_APP;
	if (flags & ION_FLAG_CP_CAMERA_PREVIEW)
		return VMID_CP_CAMERA_PREVIEW;
	if (flags & ION_FLAG_CP_SPSS_SP)
		return VMID_CP_SPSS_SP;
	if (flags & ION_FLAG_CP_SPSS_SP_SHARED)
		return VMID_CP_SPSS_SP_SHARED;
	if (flags & ION_FLAG_CP_SPSS_HLOS_SHARED)
		return VMID_CP_SPSS_HLOS_SHARED;
	return -EINVAL;
}