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

Commit 814779b5 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: secure_buffer: Add SPSS_SP vmid"

parents b5bf247c c934228c
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
/*
/*
 * Copyright (C) 2011 Google, Inc
 * Copyright (C) 2011 Google, Inc
 * Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
 * Copyright (c) 2011-2017, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * 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
 * it under the terms of the GNU General Public License version 2 and
@@ -412,6 +412,8 @@ const char *msm_secure_vmid_to_string(int secure_vmid)
		return "VMID_WLAN_CE";
		return "VMID_WLAN_CE";
	case VMID_CP_CAMERA_PREVIEW:
	case VMID_CP_CAMERA_PREVIEW:
		return "VMID_CP_CAMERA_PREVIEW";
		return "VMID_CP_CAMERA_PREVIEW";
	case VMID_CP_SPSS_SP:
		return "VMID_CP_SPSS_SP";
	case VMID_INVAL:
	case VMID_INVAL:
		return "VMID_INVAL";
		return "VMID_INVAL";
	default:
	default:
+5 −2
Original line number Original line Diff line number Diff line
/* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * 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
 * it under the terms of the GNU General Public License version 2 and
@@ -618,7 +618,8 @@ bool is_secure_vmid_valid(int vmid)
		vmid == VMID_CP_CAMERA ||
		vmid == VMID_CP_CAMERA ||
		vmid == VMID_CP_SEC_DISPLAY ||
		vmid == VMID_CP_SEC_DISPLAY ||
		vmid == VMID_CP_APP ||
		vmid == VMID_CP_APP ||
		vmid == VMID_CP_CAMERA_PREVIEW);
		vmid == VMID_CP_CAMERA_PREVIEW ||
		vmid == VMID_CP_SPSS_SP);
}
}


int get_secure_vmid(unsigned long flags)
int get_secure_vmid(unsigned long flags)
@@ -639,6 +640,8 @@ int get_secure_vmid(unsigned long flags)
		return VMID_CP_APP;
		return VMID_CP_APP;
	if (flags & ION_FLAG_CP_CAMERA_PREVIEW)
	if (flags & ION_FLAG_CP_CAMERA_PREVIEW)
		return VMID_CP_CAMERA_PREVIEW;
		return VMID_CP_CAMERA_PREVIEW;
	if (flags & ION_FLAG_CP_SPSS_SP)
		return VMID_CP_SPSS_SP;
	return -EINVAL;
	return -EINVAL;
}
}
/* fix up the cases where the ioctl direction bits are incorrect */
/* fix up the cases where the ioctl direction bits are incorrect */
+1 −0
Original line number Original line Diff line number Diff line
@@ -84,6 +84,7 @@ enum cp_mem_usage {
#define ION_FLAG_CP_NON_PIXEL		ION_BIT(20)
#define ION_FLAG_CP_NON_PIXEL		ION_BIT(20)
#define ION_FLAG_CP_CAMERA		ION_BIT(21)
#define ION_FLAG_CP_CAMERA		ION_BIT(21)
#define ION_FLAG_CP_HLOS		ION_BIT(22)
#define ION_FLAG_CP_HLOS		ION_BIT(22)
#define ION_FLAG_CP_SPSS_SP		ION_BIT(23)
#define ION_FLAG_CP_SEC_DISPLAY		ION_BIT(25)
#define ION_FLAG_CP_SEC_DISPLAY		ION_BIT(25)
#define ION_FLAG_CP_APP			ION_BIT(26)
#define ION_FLAG_CP_APP			ION_BIT(26)
#define ION_FLAG_CP_CAMERA_PREVIEW	ION_BIT(27)
#define ION_FLAG_CP_CAMERA_PREVIEW	ION_BIT(27)
+2 −1
Original line number Original line Diff line number Diff line
/*
/*
 * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * 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
 * it under the terms of the GNU General Public License version 2 and
@@ -37,6 +37,7 @@ enum vmid {
	VMID_CP_APP = 0x12,
	VMID_CP_APP = 0x12,
	VMID_WLAN = 0x18,
	VMID_WLAN = 0x18,
	VMID_WLAN_CE = 0x19,
	VMID_WLAN_CE = 0x19,
	VMID_CP_SPSS_SP = 0x1A,
	VMID_CP_CAMERA_PREVIEW = 0x1D,
	VMID_CP_CAMERA_PREVIEW = 0x1D,
	VMID_LAST,
	VMID_LAST,
	VMID_INVAL = -1
	VMID_INVAL = -1