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

Commit fcc3d9de authored by Sunil Khatri's avatar Sunil Khatri
Browse files

msm: kgsl: Add a property to find if secure context is supported



Add a property to determine if a target support secure context
for use cases like CPZ.

This property can be used by userspace application to create
a secure context if its supported on the target.

Change-Id: I1ccc824378fb8fbd2cfbc7b811c6c3fdcd17803e
Signed-off-by: default avatarSunil Khatri <sunilkh@codeaurora.org>
parent a27454c8
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -1384,6 +1384,23 @@ long kgsl_ioctl_device_getproperty(struct kgsl_device_private *dev_priv,

		break;
	}
	case KGSL_PROP_SECURE_CTXT_SUPPORT:
	{
		unsigned int secure_ctxt;

		if (param->sizebytes != sizeof(unsigned int)) {
			result = -EINVAL;
			break;
		}

		secure_ctxt = dev_priv->device->mmu.secured ? 1 : 0;

		if (copy_to_user(param->value, &secure_ctxt,
				sizeof(secure_ctxt)))
			result = -EFAULT;

		break;
	}
	default:
		if (is_compat_task())
			result = dev_priv->device->ftbl->getproperty_compat(
+1 −0
Original line number Diff line number Diff line
@@ -312,6 +312,7 @@ enum kgsl_timestamp_type {
#define KGSL_PROP_DEVICE_BITNESS	0x18
#define KGSL_PROP_DEVICE_QDSS_STM	0x19
#define KGSL_PROP_SECURE_BUFFER_ALIGNMENT 0x23
#define KGSL_PROP_SECURE_CTXT_SUPPORT 0x24

struct kgsl_shadowprop {
	unsigned long gpuaddr;