diff options
| author | Omar <onemri@nvidia.com> | 2019-07-01 03:24:26 -0400 |
|---|---|---|
| committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2019-09-25 18:40:27 -0400 |
| commit | 8ee682f583bdec5239ce8ff6ec15a7e53f950114 (patch) | |
| tree | e22bf530a35c06b73708db1225c5fc70f5a6ab41 /include | |
| parent | 97d004f46485e5eb4153065bd5042198ea27eef9 (diff) | |
nvhost: pva: enhance fence support
add pva_fence type
Jira PVA-1704
Change-Id: I9db775a6aa47537ede72b840174d8cd35bc87430
Signed-off-by: Omar <onemri@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2146024
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: Colin Tracey <ctracey@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2193694
Reviewed-by: Nitin Pai <npai@nvidia.com>
Tested-by: Colin Tracey <ctracey@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/uapi/linux/nvhost_pva_ioctl.h | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/include/uapi/linux/nvhost_pva_ioctl.h b/include/uapi/linux/nvhost_pva_ioctl.h index 1c8fc7eae..05387d7c1 100644 --- a/include/uapi/linux/nvhost_pva_ioctl.h +++ b/include/uapi/linux/nvhost_pva_ioctl.h | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | 21 | ||
| 22 | #include <linux/ioctl.h> | 22 | #include <linux/ioctl.h> |
| 23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
| 24 | #include "nvdev_fence.h" | ||
| 24 | 25 | ||
| 25 | #if !defined(__KERNEL__) | 26 | #if !defined(__KERNEL__) |
| 26 | #define __user | 27 | #define __user |
| @@ -180,10 +181,30 @@ struct pva_fence { | |||
| 180 | __u32 semaphore_offset; | 181 | __u32 semaphore_offset; |
| 181 | __u32 semaphore_value; | 182 | __u32 semaphore_value; |
| 182 | }; | 183 | }; |
| 184 | /** | ||
| 185 | * PVA extended fence | ||
| 186 | * | ||
| 187 | * @param type fence type | ||
| 188 | * @param fence nvdev_fence | ||
| 189 | * @param ts_buf_handle Handle of timestamp buffer | ||
| 190 | */ | ||
| 191 | struct nvpva_fence { | ||
| 192 | __u32 type; | ||
| 193 | #define PVA_FENCE_PRE 1U | ||
| 194 | #define PVA_FENCE_SOT_V 2U | ||
| 195 | #define PVA_FENCE_SOT_R 3U | ||
| 196 | #define PVA_FENCE_EOT_V 4U | ||
| 197 | #define PVA_FENCE_EOT_R 5U | ||
| 198 | #define PVA_FENCE_POST 6U | ||
| 199 | struct pva_memory_handle ts_buf_ptr; | ||
| 200 | struct nvdev_fence fence; | ||
| 201 | }; | ||
| 183 | 202 | ||
| 184 | #define PVA_MAX_TASKS 1 | 203 | #define PVA_MAX_TASKS 1 |
| 185 | #define PVA_MAX_PREFENCES 8 | 204 | #define PVA_MAX_PREFENCES 8 |
| 186 | #define PVA_MAX_POSTFENCES 8 | 205 | #define PVA_MAX_POSTFENCES 8 |
| 206 | #define PVA_MAX_FENCE_TYPES 7 | ||
| 207 | #define PVA_MAX_FENCES_PER_TYPE 8 | ||
| 187 | #define PVA_MAX_INPUT_STATUS 8 | 208 | #define PVA_MAX_INPUT_STATUS 8 |
| 188 | #define PVA_MAX_OUTPUT_STATUS 8 | 209 | #define PVA_MAX_OUTPUT_STATUS 8 |
| 189 | #define PVA_MAX_INPUT_SURFACES 8 | 210 | #define PVA_MAX_INPUT_SURFACES 8 |
| @@ -217,7 +238,7 @@ struct pva_fence { | |||
| 217 | */ | 238 | */ |
| 218 | struct pva_ioctl_submit_task { | 239 | struct pva_ioctl_submit_task { |
| 219 | __u8 num_prefences; | 240 | __u8 num_prefences; |
| 220 | __u8 num_postfences; | 241 | __u8 redserved1; |
| 221 | __u8 num_input_surfaces; | 242 | __u8 num_input_surfaces; |
| 222 | __u8 num_output_surfaces; | 243 | __u8 num_output_surfaces; |
| 223 | __u8 num_input_task_status; | 244 | __u8 num_input_task_status; |
| @@ -228,18 +249,19 @@ struct pva_ioctl_submit_task { | |||
| 228 | __u32 operation; | 249 | __u32 operation; |
| 229 | __u64 timeout; | 250 | __u64 timeout; |
| 230 | __u64 prefences; | 251 | __u64 prefences; |
| 231 | __u64 postfences; | 252 | __u8 reserved2[8]; |
| 232 | __u64 input_surfaces; | 253 | __u64 input_surfaces; |
| 233 | struct pva_task_parameter input_scalars; | 254 | struct pva_task_parameter input_scalars; |
| 234 | __u64 primary_payload; | 255 | __u64 primary_payload; |
| 235 | __u8 reserved0[8]; | 256 | __u8 reserved3[8]; |
| 236 | __u64 output_surfaces; | 257 | __u64 output_surfaces; |
| 237 | struct pva_task_parameter output_scalars; | 258 | struct pva_task_parameter output_scalars; |
| 238 | __u8 reserved1[16]; | 259 | __u64 num_pva_ts_buffers; |
| 260 | __u64 num_pvafences; | ||
| 261 | __u64 pvafences; | ||
| 239 | __u64 input_task_status; | 262 | __u64 input_task_status; |
| 240 | __u64 output_task_status; | 263 | __u64 output_task_status; |
| 241 | }; | 264 | }; |
| 242 | |||
| 243 | /** | 265 | /** |
| 244 | * struct pva_submit_args - submit tasks to PVA | 266 | * struct pva_submit_args - submit tasks to PVA |
| 245 | * | 267 | * |
