2222/*
2323 * Minor version changes when API backward compatibility is preserved.
2424 */
25- #define VPU_JSM_API_VER_MINOR 25
25+ #define VPU_JSM_API_VER_MINOR 29
2626
2727/*
2828 * API header changed (field names, documentation, formatting) but API itself has not been changed
5353 * Engine indexes.
5454 */
5555#define VPU_ENGINE_COMPUTE 0
56- #define VPU_ENGINE_COPY 1
57- #define VPU_ENGINE_NB 2
56+ #define VPU_ENGINE_NB 1
5857
5958/*
6059 * VPU status values.
@@ -126,11 +125,13 @@ enum {
126125 * When set, indicates that job queue uses native fences (as inline commands
127126 * in job queue). Such queues may also use legacy fences (as commands in batch buffers).
128127 * When cleared, indicates the job queue only uses legacy fences.
129- * NOTE: For queues using native fences, VPU expects that all jobs in the queue
130- * are immediately followed by an inline command object. This object is expected
131- * to be a fence signal command in most cases, but can also be a NOP in case the host
132- * does not need per-job fence signalling. Other inline commands objects can be
133- * inserted between "job and inline command" pairs.
128+ * NOTES:
129+ * 1. For queues using native fences, VPU expects that all jobs in the queue
130+ * are immediately followed by an inline command object. This object is expected
131+ * to be a fence signal command in most cases, but can also be a NOP in case the host
132+ * does not need per-job fence signalling. Other inline commands objects can be
133+ * inserted between "job and inline command" pairs.
134+ * 2. Native fence queues are only supported on VPU 40xx onwards.
134135 */
135136 VPU_JOB_QUEUE_FLAGS_USE_NATIVE_FENCE_MASK = (1 << 1U ),
136137
@@ -275,6 +276,8 @@ struct vpu_inline_cmd {
275276 u64 value ;
276277 /* User VA of the log buffer in which to add log entry on completion. */
277278 u64 log_buffer_va ;
279+ /* NPU private data. */
280+ u64 npu_private_data ;
278281 } fence ;
279282 /* Other commands do not have a payload. */
280283 /* Payload definition for future inline commands can be inserted here. */
@@ -791,12 +794,22 @@ struct vpu_jsm_metric_streamer_update {
791794 /** Metric group mask that identifies metric streamer instance. */
792795 u64 metric_group_mask ;
793796 /**
794- * Address and size of the buffer where the VPU will write metric data. If
795- * the buffer address is 0 or same as the currently used buffer the VPU will
796- * continue writing metric data to the current buffer. In this case the
797- * buffer size is ignored and the size of the current buffer is unchanged.
798- * If the address is non-zero and differs from the current buffer address the
799- * VPU will immediately switch data collection to the new buffer.
797+ * Address and size of the buffer where the VPU will write metric data.
798+ * This member dictates how the update operation should perform:
799+ * 1. client needs information about the number of collected samples and the
800+ * amount of data written to the current buffer
801+ * 2. client wants to switch to a new buffer
802+ *
803+ * Case 1. is identified by the buffer address being 0 or the same as the
804+ * currently used buffer address. In this case the buffer size is ignored and
805+ * the size of the current buffer is unchanged. The VPU will return an update
806+ * in the vpu_jsm_metric_streamer_done structure. The internal writing position
807+ * into the buffer is not changed.
808+ *
809+ * Case 2. is identified by the address being non-zero and differs from the
810+ * current buffer address. The VPU will immediately switch data collection to
811+ * the new buffer. Then the VPU will return an update in the
812+ * vpu_jsm_metric_streamer_done structure.
800813 */
801814 u64 buffer_addr ;
802815 u64 buffer_size ;
@@ -934,6 +947,7 @@ struct vpu_ipc_msg_payload_hws_priority_band_setup {
934947 /*
935948 * Default quantum in 100ns units for scheduling across processes
936949 * within a priority band
950+ * Minimum value supported by NPU is 1ms (10000 in 100ns units).
937951 */
938952 u32 process_quantum [VPU_HWS_NUM_PRIORITY_BANDS ];
939953 /*
@@ -946,8 +960,10 @@ struct vpu_ipc_msg_payload_hws_priority_band_setup {
946960 * in situations when it's starved by the focus band.
947961 */
948962 u32 normal_band_percentage ;
949- /* Reserved */
950- u32 reserved_0 ;
963+ /*
964+ * TDR timeout value in milliseconds. Default value of 0 meaning no timeout.
965+ */
966+ u32 tdr_timeout ;
951967};
952968
953969/*
@@ -1024,7 +1040,10 @@ struct vpu_ipc_msg_payload_hws_set_context_sched_properties {
10241040 s32 in_process_priority ;
10251041 /* Zero padding / Reserved */
10261042 u32 reserved_1 ;
1027- /* Context quantum relative to other contexts of same priority in the same process */
1043+ /*
1044+ * Context quantum relative to other contexts of same priority in the same process
1045+ * Minimum value supported by NPU is 1ms (10000 in 100ns units).
1046+ */
10281047 u64 context_quantum ;
10291048 /* Grace period when preempting context of the same priority within the same process */
10301049 u64 grace_period_same_priority ;
0 commit comments