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

Commit 643c0858 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ion: util: Add permission settings for CDSP"

parents bec7139c ae62e960
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -148,6 +148,8 @@ int ion_hyp_assign_sg(struct sg_table *sgt, int *dest_vm_list,
	for (i = 0; i < dest_nelems; i++) {
		if (dest_vm_list[i] == VMID_CP_SEC_DISPLAY)
			dest_perms[i] = PERM_READ;
		else if (dest_vm_list[i] == VMID_CP_CDSP)
			dest_perms[i] = PERM_READ | PERM_WRITE | PERM_EXEC;
		else
			dest_perms[i] = PERM_READ | PERM_WRITE;
	}
@@ -267,6 +269,8 @@ int ion_hyp_assign_from_flags(u64 base, u64 size, unsigned long flags)
	for (i = 0; i < nr; i++)
		if (vmids[i] == VMID_CP_SEC_DISPLAY)
			modes[i] = PERM_READ;
		else if (vmids[i] == VMID_CP_CDSP)
			modes[i] = PERM_READ | PERM_WRITE | PERM_EXEC;
		else
			modes[i] = PERM_READ | PERM_WRITE;