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

Commit f92b061e authored by Patrick Daly's avatar Patrick Daly
Browse files

ion: msm: Add support for VMID_CP_CDSP



Add necessary flags for userspace to request this type of memory.

Change-Id: Ic603cb6cf186f3dec483b5a769ed4c405667d9e4
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
parent a7414b1e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -659,7 +659,8 @@ bool is_secure_vmid_valid(int vmid)
		vmid == VMID_CP_CAMERA_PREVIEW ||
		vmid == VMID_CP_SPSS_SP ||
		vmid == VMID_CP_SPSS_SP_SHARED ||
		vmid == VMID_CP_SPSS_HLOS_SHARED);
		vmid == VMID_CP_SPSS_HLOS_SHARED ||
		vmid == VMID_CP_CDSP);
}

unsigned int count_set_bits(unsigned long val)
@@ -709,6 +710,8 @@ int get_secure_vmid(unsigned long flags)
		return VMID_CP_SPSS_SP_SHARED;
	if (flags & ION_FLAG_CP_SPSS_HLOS_SHARED)
		return VMID_CP_SPSS_HLOS_SHARED;
	if (flags & ION_FLAG_CP_CDSP)
		return VMID_CP_CDSP;
	return -EINVAL;
}

+2 −0
Original line number Diff line number Diff line
@@ -90,6 +90,8 @@ enum cp_mem_usage {
#define ION_FLAG_CP_SEC_DISPLAY		ION_BIT(25)
#define ION_FLAG_CP_APP			ION_BIT(26)
#define ION_FLAG_CP_CAMERA_PREVIEW	ION_BIT(27)
/* ION_FLAG_ALLOW_NON_CONTIG uses ION_BIT(28) */
#define ION_FLAG_CP_CDSP		ION_BIT(29)
#define ION_FLAG_CP_SPSS_HLOS_SHARED	ION_BIT(30)

/**
+2 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -41,6 +41,7 @@ enum vmid {
	VMID_CP_CAMERA_PREVIEW = 0x1D,
	VMID_CP_SPSS_SP_SHARED = 0x22,
	VMID_CP_SPSS_HLOS_SHARED = 0x24,
	VMID_CP_CDSP = 0x2A,
	VMID_LAST,
	VMID_INVAL = -1
};