summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorShridhar Rasal <srasal@nvidia.com>2016-07-27 04:49:08 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-08-17 03:03:56 -0400
commit37febd472a4920976c841fadb37a9a2aae76d0f4 (patch)
tree0b5d1c47711a9305cddfc73c414496965c56297a /include/linux
parentf3915b1856cfe4af1bf7f7200dfa8c3b770f28c0 (diff)
video: tegra: host: dla: add basic tasklist support
- fix include files path in makefile - fix ioctl include header file path - update comments in doxygen format add support to submit task to engine as per tasklist management protocol - maintain list of tasks under assigned queue with ref counts - allocates task to maintain list of fences and update them - dma alloc task descriptor and action list and update them - submit tasks one by one and send received fence back to application - register for syncpoint notifier with nvhost for completion of fence - on fence completion interrupt handler, cleanup task Jira DLA-52 Change-Id: Ibe385f47dc9f17dda79cca3daf29b89218dc7289 Signed-off-by: Shridhar Rasal <srasal@nvidia.com> Reviewed-on: http://git-master/r/1191495 Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nvhost_nvdla_ioctl.h69
1 files changed, 52 insertions, 17 deletions
diff --git a/include/linux/nvhost_nvdla_ioctl.h b/include/linux/nvhost_nvdla_ioctl.h
index 06f4f1011..1db5d710e 100644
--- a/include/linux/nvhost_nvdla_ioctl.h
+++ b/include/linux/nvhost_nvdla_ioctl.h
@@ -28,17 +28,42 @@
28#define __user 28#define __user
29#endif 29#endif
30 30
31/**
32 * struct nvdla_ctrl_ping_args structure for ping data
33 *
34 * @in_challenge challenge data to be sent
35 * @out_response response/CRC on challenge data from engine
36 *
37 */
31struct nvdla_ctrl_ping_args { 38struct nvdla_ctrl_ping_args {
32 __u32 in_challenge; 39 __u32 in_challenge;
33 __u32 out_response; 40 __u32 out_response;
34}; 41};
35 42
43
44/**
45 * struct nvdla_ctrl_pin_unpin_args strcture args for buffer pin/unpin
46 *
47 * @buffers list of buffers to pin/unpin'ed
48 * @num_buffers number of buffers count
49 * @reserved reserved for future use
50 *
51 */
36struct nvdla_ctrl_pin_unpin_args { 52struct nvdla_ctrl_pin_unpin_args {
37 __u64 buffers; 53 __u64 buffers;
38 __u32 num_buffers; 54 __u32 num_buffers;
39 __u32 reserved; 55 __u32 reserved;
40}; 56};
41 57
58/**
59 * struct nvdla_ctrl_submit_args structure for task submit
60 *
61 * @tasks pointer to task list
62 * @num_tasks number of tasks count
63 * @flags flags for task submit, like atomic
64 * @version version of task structure
65 *
66 */
42struct nvdla_ctrl_submit_args { 67struct nvdla_ctrl_submit_args {
43 __u64 tasks; 68 __u64 tasks;
44 __u16 num_tasks; 69 __u16 num_tasks;
@@ -48,6 +73,25 @@ struct nvdla_ctrl_submit_args {
48 __u32 version; 73 __u32 version;
49}; 74};
50 75
76/**
77 * struct nvdla_ctrl_ioctl_submit_task structure for single task information
78 *
79 * @num_prefences number of pre-fences in task
80 * @num_postfences number of post-fences in task
81 * @num_input_task_status number of input task status
82 * @num_output_task_status number of output task status
83 * @flags flags for bitwise task info embeddeing
84 * @reserved reserved for future use
85 * @prefences pointer to pre-fence struct table
86 * @postfences pointer to post-fence struct table
87 * @input_task_status pointer to input task status struct table
88 * @output_task_status pointer to output task status struct table
89 * @num_operations number of operations for a task
90 * @num_addresses total number of addressed passed in structure
91 * @surface_desc pointer to surface descriptor
92 * @address_list pointer to address list
93 *
94 */
51struct nvdla_ctrl_ioctl_submit_task { 95struct nvdla_ctrl_ioctl_submit_task {
52 __u8 num_prefences; 96 __u8 num_prefences;
53 __u8 num_postfences; 97 __u8 num_postfences;
@@ -70,6 +114,14 @@ struct nvdla_ctrl_ioctl_submit_task {
70 __u64 address_list; 114 __u64 address_list;
71}; 115};
72 116
117/**
118 * struct nvdla_fence structure for passing fence information
119 *
120 * @type type of fence: syncpoint, Linux Sync Fd
121 * @syncpoint_index syncpoint id
122 * @syncpoint_value value of syncpoint id
123 * @sync_fd Linux sync FD handle
124 */
73struct nvdla_fence { 125struct nvdla_fence {
74 __u32 type; 126 __u32 type;
75#define NVDLA_FENCE_TYPE_SYNCPT 0 127#define NVDLA_FENCE_TYPE_SYNCPT 0
@@ -79,23 +131,6 @@ struct nvdla_fence {
79 __u32 sync_fd; 131 __u32 sync_fd;
80}; 132};
81 133
82struct nvdla_task_surface {
83 __u64 format;
84 __u32 handle;
85 __u32 offset;
86};
87
88struct nvdla_task_roi {
89 __u32 handle;
90 __u32 offset;
91};
92
93struct nvdla_task_status_handle {
94 __u32 handle;
95 __u32 reserved;
96 __u64 offset;
97};
98
99#define NVHOST_NVDLA_IOCTL_MAGIC 'D' 134#define NVHOST_NVDLA_IOCTL_MAGIC 'D'
100 135
101#define NVDLA_IOCTL_CTRL_PING \ 136#define NVDLA_IOCTL_CTRL_PING \