summaryrefslogtreecommitdiffstats
path: root/include/linux/nvhost_ioctl.h
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2018-02-27 09:59:38 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-03-06 15:18:31 -0500
commit573cb291ea2de46d1da0737a5893e3b94f23a5f9 (patch)
tree195ff025b4952a3fda89b41f767c2eec434992ef /include/linux/nvhost_ioctl.h
parentfd9be2dcdfc439197a38133230cc275092e4bfee (diff)
video: tegra: host: add User API to get poll'able FD
Add IOCTL API NVHOST_IOCTL_CTRL_POLL_FD_CREATE to get a poll'able file descriptor This API will allocate a file descriptor and set struct nvhost_event_poll_fd_rec as private data for file Also define poll and release operations for the file descriptor poll() API will return success if event is posted on private data It will also clear the event before returning Bug 200326065 Jira HOSTX-332 Change-Id: I5bca2f8e26cbac848d3fd714aa4d7198b5895fe5 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1665694 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include/linux/nvhost_ioctl.h')
-rw-r--r--include/linux/nvhost_ioctl.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/nvhost_ioctl.h b/include/linux/nvhost_ioctl.h
index 0bae555b8..94d0f4a99 100644
--- a/include/linux/nvhost_ioctl.h
+++ b/include/linux/nvhost_ioctl.h
@@ -3,7 +3,7 @@
3 * 3 *
4 * Tegra graphics host driver 4 * Tegra graphics host driver
5 * 5 *
6 * Copyright (c) 2009-2017, NVIDIA Corporation. All rights reserved. 6 * Copyright (c) 2009-2018, NVIDIA Corporation. All rights reserved.
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
@@ -439,6 +439,11 @@ struct nvhost_ctrl_check_module_support_args {
439 __u32 value; 439 __u32 value;
440}; 440};
441 441
442struct nvhost_ctrl_poll_fd_create_args {
443 __s32 fd;
444 __u32 padding;
445};
446
442#define NVHOST_IOCTL_CTRL_SYNCPT_READ \ 447#define NVHOST_IOCTL_CTRL_SYNCPT_READ \
443 _IOWR(NVHOST_IOCTL_MAGIC, 1, struct nvhost_ctrl_syncpt_read_args) 448 _IOWR(NVHOST_IOCTL_MAGIC, 1, struct nvhost_ctrl_syncpt_read_args)
444#define NVHOST_IOCTL_CTRL_SYNCPT_INCR \ 449#define NVHOST_IOCTL_CTRL_SYNCPT_INCR \
@@ -475,9 +480,11 @@ struct nvhost_ctrl_check_module_support_args {
475 _IOWR(NVHOST_IOCTL_MAGIC, 14, struct nvhost_ctrl_get_characteristics) 480 _IOWR(NVHOST_IOCTL_MAGIC, 14, struct nvhost_ctrl_get_characteristics)
476#define NVHOST_IOCTL_CTRL_CHECK_MODULE_SUPPORT \ 481#define NVHOST_IOCTL_CTRL_CHECK_MODULE_SUPPORT \
477 _IOWR(NVHOST_IOCTL_MAGIC, 15, struct nvhost_ctrl_check_module_support_args) 482 _IOWR(NVHOST_IOCTL_MAGIC, 15, struct nvhost_ctrl_check_module_support_args)
483#define NVHOST_IOCTL_CTRL_POLL_FD_CREATE \
484 _IOR(NVHOST_IOCTL_MAGIC, 16, struct nvhost_ctrl_poll_fd_create_args)
478 485
479#define NVHOST_IOCTL_CTRL_LAST \ 486#define NVHOST_IOCTL_CTRL_LAST \
480 _IOC_NR(NVHOST_IOCTL_CTRL_CHECK_MODULE_SUPPORT) 487 _IOC_NR(NVHOST_IOCTL_CTRL_POLL_FD_CREATE)
481#define NVHOST_IOCTL_CTRL_MAX_ARG_SIZE \ 488#define NVHOST_IOCTL_CTRL_MAX_ARG_SIZE \
482 sizeof(struct nvhost_ctrl_syncpt_waitmex_args) 489 sizeof(struct nvhost_ctrl_syncpt_waitmex_args)
483 490