hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/drivers/rknpu/include/rknpu_ioctl.h
....@@ -25,7 +25,6 @@
2525 #define RKNPU_OFFSET_PC_DATA_AMOUNT 0x14
2626 #define RKNPU_OFFSET_PC_TASK_CONTROL 0x30
2727 #define RKNPU_OFFSET_PC_DMA_BASE_ADDR 0x34
28
-#define RKNPU_OFFSET_PC_TASK_STATUS 0x3c
2928
3029 #define RKNPU_OFFSET_INT_MASK 0x20
3130 #define RKNPU_OFFSET_INT_CLEAR 0x24
....@@ -74,15 +73,17 @@
7473 RKNPU_MEM_ZEROING = 1 << 5,
7574 /* allocate secure buffer */
7675 RKNPU_MEM_SECURE = 1 << 6,
77
- /* allocate from non-dma32 zone */
78
- RKNPU_MEM_NON_DMA32 = 1 << 7,
76
+ /* allocate from dma32 zone */
77
+ RKNPU_MEM_DMA32 = 1 << 7,
7978 /* request SRAM */
8079 RKNPU_MEM_TRY_ALLOC_SRAM = 1 << 8,
80
+ /* request NBUF */
81
+ RKNPU_MEM_TRY_ALLOC_NBUF = 1 << 9,
8182 RKNPU_MEM_MASK = RKNPU_MEM_NON_CONTIGUOUS | RKNPU_MEM_CACHEABLE |
8283 RKNPU_MEM_WRITE_COMBINE | RKNPU_MEM_KERNEL_MAPPING |
8384 RKNPU_MEM_IOMMU | RKNPU_MEM_ZEROING |
84
- RKNPU_MEM_SECURE | RKNPU_MEM_NON_DMA32 |
85
- RKNPU_MEM_TRY_ALLOC_SRAM
85
+ RKNPU_MEM_SECURE | RKNPU_MEM_DMA32 |
86
+ RKNPU_MEM_TRY_ALLOC_SRAM | RKNPU_MEM_TRY_ALLOC_NBUF
8687 };
8788
8889 /* sync mode definitions. */
....@@ -250,7 +251,7 @@
250251 * @task_obj_addr: address of task object
251252 * @regcfg_obj_addr: address of register config object
252253 * @task_base_addr: task base address
253
- * @user_data: (optional) user data
254
+ * @hw_elapse_time: hardware elapse time
254255 * @core_mask: core mask of rknpu
255256 * @fence_fd: dma fence fd
256257 * @subcore_task: subcore task
....@@ -266,7 +267,7 @@
266267 __u64 task_obj_addr;
267268 __u64 regcfg_obj_addr;
268269 __u64 task_base_addr;
269
- __u64 user_data;
270
+ __s64 hw_elapse_time;
270271 __u32 core_mask;
271272 __s32 fence_fd;
272273 struct rknpu_subcore_task subcore_task[5];