summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorSunil Khatri <sunilkh@codeaurora.org>2018-08-10 11:46:58 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2018-10-08 06:31:31 -0700
commit4d6804439eb8f3f838bf0c91dd912dc41b2586a4 (patch)
treeb933ab5818ed955dead4e9a1e18f8b02b1abdd4e /drivers/gpu
parent3d69d2b9493206838d2c2d7a41b71321a73a802a (diff)
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: Sunil Khatri <sunilkh@codeaurora.org>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/msm/kgsl.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/msm/kgsl.c b/drivers/gpu/msm/kgsl.c
index 41c9faf3bdd5..55ebc0a8e26c 100644
--- a/drivers/gpu/msm/kgsl.c
+++ b/drivers/gpu/msm/kgsl.c
@@ -1425,6 +1425,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(