From 99b319a13e559bc8eec488ec35cb50ed23d0e68b Mon Sep 17 00:00:00 2001 From: Shridhar Rasal Date: Mon, 25 Jul 2016 14:58:10 +0530 Subject: video: tegra: host: dla: add submit IOCTL - add initial task submit stub Jira DLA-19 Change-Id: Iea249cfd14cf186b984d1f296373740f80429c3d Signed-off-by: Shridhar Rasal Reviewed-on: http://git-master/r/1191493 --- include/linux/nvhost_nvdla_ioctl.h | 62 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/nvhost_nvdla_ioctl.h b/include/linux/nvhost_nvdla_ioctl.h index b5b6c676b..06f4f1011 100644 --- a/include/linux/nvhost_nvdla_ioctl.h +++ b/include/linux/nvhost_nvdla_ioctl.h @@ -39,6 +39,63 @@ struct nvdla_ctrl_pin_unpin_args { __u32 reserved; }; +struct nvdla_ctrl_submit_args { + __u64 tasks; + __u16 num_tasks; +#define MAX_TASKS_PER_SUBMIT 32 +#define NVDLA_SUBMIT_FLAGS_ATOMIC (1 << 0) + __u16 flags; + __u32 version; +}; + +struct nvdla_ctrl_ioctl_submit_task { + __u8 num_prefences; + __u8 num_postfences; + __u8 num_input_task_status; + __u8 num_output_task_status; + __u16 flags; + __u16 reserved; + + __u64 prefences; + __u64 postfences; + + __u64 input_task_status; + __u64 output_task_status; + + __u32 num_operations; + __u32 num_addresses; + __u64 operation_desc; + + __u64 surface_desc; + __u64 address_list; +}; + +struct nvdla_fence { + __u32 type; +#define NVDLA_FENCE_TYPE_SYNCPT 0 +#define NVDLA_FENCE_TYPE_SYNC_FD 1 + __u32 syncpoint_index; + __u32 syncpoint_value; + __u32 sync_fd; +}; + +struct nvdla_task_surface { + __u64 format; + __u32 handle; + __u32 offset; +}; + +struct nvdla_task_roi { + __u32 handle; + __u32 offset; +}; + +struct nvdla_task_status_handle { + __u32 handle; + __u32 reserved; + __u64 offset; +}; + #define NVHOST_NVDLA_IOCTL_MAGIC 'D' #define NVDLA_IOCTL_CTRL_PING \ @@ -47,9 +104,10 @@ struct nvdla_ctrl_pin_unpin_args { _IOW(NVHOST_NVDLA_IOCTL_MAGIC, 2, struct nvdla_ctrl_pin_unpin_args) #define NVDLA_IOCTL_CTRL_UNPIN \ _IOW(NVHOST_NVDLA_IOCTL_MAGIC, 3, struct nvdla_ctrl_pin_unpin_args) - +#define NVDLA_IOCTL_CTRL_SUBMIT \ + _IOW(NVHOST_NVDLA_IOCTL_MAGIC, 4, struct nvdla_ctrl_submit_args) #define NVDLA_IOCTL_CTRL_LAST \ - _IOC_NR(NVDLA_IOCTL_CTRL_UNPIN) + _IOC_NR(NVDLA_IOCTL_CTRL_SUBMIT) #define NVDLA_IOCTL_CTRL_MAX_ARG_SIZE \ sizeof(struct nvdla_ctrl_pin_unpin_args) -- cgit v1.2.2