summaryrefslogtreecommitdiff
path: root/drivers/gpu/msm
diff options
context:
space:
mode:
authorSunil Khatri <sunilkh@codeaurora.org>2017-10-30 15:12:02 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2017-10-30 02:52:21 -0700
commita943eac9d4d2a1ee11544f57d5742bbcaff17dd9 (patch)
tree46774ff24a316ad1c1d5bc9f23164212110eaeeb /drivers/gpu/msm
parent31c9729a258a6495a344e2ec692e43fab9a0db87 (diff)
msm: kgsl: Add property to determine commands timeout
Add the property to determine the current command timeout value which is used by the clients via KGSL IOCTL. Change-Id: Ifd6b373d211ebd78dc3a8032ede073258487d689 Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
Diffstat (limited to 'drivers/gpu/msm')
-rw-r--r--drivers/gpu/msm/adreno.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/msm/adreno.c b/drivers/gpu/msm/adreno.c
index c620c7ac1afa..9b171389d69d 100644
--- a/drivers/gpu/msm/adreno.c
+++ b/drivers/gpu/msm/adreno.c
@@ -1922,6 +1922,26 @@ static int adreno_getproperty(struct kgsl_device *device,
status = 0;
}
break;
+ case KGSL_PROP_IB_TIMEOUT:
+ {
+ unsigned int ib_timeout = adreno_drawobj_timeout;
+
+ if (ib_timeout == 0)
+ return -EINVAL;
+
+ if (sizebytes != sizeof(unsigned int)) {
+ status = -EINVAL;
+ break;
+ }
+
+ if (copy_to_user(value, &ib_timeout,
+ sizeof(unsigned int))) {
+ status = -EFAULT;
+ break;
+ }
+ status = 0;
+ }
+ break;
default:
status = -EINVAL;