Lines Matching +full:cs +full:- +full:number

1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
3 * Copyright 2016-2020 HabanaLabs, Ltd.
15 * Defines that are asic-specific but constitutes as ABI between kernel driver
294 * HW_IP_INFO - Receive information about different IP blocks in the
296 * HL_INFO_HW_EVENTS - Receive an array describing how many times each event
298 * HL_INFO_DRAM_USAGE - Retrieve the dram usage inside the device and of the
301 * HL_INFO_HW_IDLE - Retrieve information about the idle status of each
303 * HL_INFO_DEVICE_STATUS - Retrieve the device's status. This opcode doesn't
305 * HL_INFO_DEVICE_UTILIZATION - Retrieve the total utilization of the device
310 * HL_INFO_HW_EVENTS_AGGREGATE - Receive an array describing how many times each
312 * HL_INFO_CLK_RATE - Retrieve the current and maximum clock rate
315 * HL_INFO_RESET_COUNT - Retrieve the counts of the soft and hard reset
318 * HL_INFO_TIME_SYNC - Retrieve the device's time alongside the host's time
320 * HL_INFO_CS_COUNTERS - Retrieve command submission counters
321 * HL_INFO_PCI_COUNTERS - Retrieve PCI counters
322 * HL_INFO_CLK_THROTTLE_REASON - Retrieve clock throttling reason
323 * HL_INFO_SYNC_MANAGER - Retrieve sync manager info per dcore
324 * HL_INFO_TOTAL_ENERGY - Retrieve total energy consumption
325 * HL_INFO_PLL_FREQUENCY - Retrieve PLL frequency
326 * HL_INFO_OPEN_STATS - Retrieve info regarding recent device open calls
351 * struct hl_info_hw_ip_info - hardware information on various IPs in the ASIC
358 * @num_of_events: The number of events that can be received from the f/w. This
375 * @tpc_enabled_mask: Bit-mask that represents which TPCs are enabled. Relevant
455 * struct hl_info_pci_counters - pci counters
470 * struct hl_info_clk_throttle - clock throttling reason
478 * struct hl_info_energy - device energy information
492 * struct hl_open_stats_info - device open statistics information
502 * struct hl_power_info - power information
510 * struct hl_info_sync_manager - sync manager information
523 * struct hl_info_cs_counters - command submission counters
532 * @total_max_cs_in_flight_drop_cnt: total dropped due to maximum CS in-flight
533 * @ctx_max_cs_in_flight_drop_cnt: context dropped due to maximum CS in-flight
579 /* Context ID - Currently not in use */
581 /* Period value for utilization rate (100ms - 1000ms, in 100ms
600 #define HL_MAX_CB_SIZE (0x200000 - 32)
614 /* Context ID - Currently not in use */
648 * “HL_MAX_CB_SIZE”. Therefore, it increases the PCI-DMA queues
650 * DMA-able memory pool. Which are limited and used by other Linux
651 * sub-systems.
656 * This structure size must always be fixed to 64-bytes for backward
675 * signal CS sequence numbers. The wait described by
685 * This is the CS sequence which has the encapsulated signals.
702 * Number of entries in signal_seq_arr
744 * The encapsulated signals CS is merged into the existing CS ioctls.
746 * 1. Reserve signals, set the CS type to HL_CS_FLAGS_RESERVE_SIGNALS_ONLY
751 * CS type, note that this might fail if out-of-sync happened to the SOB
753 * reserve-unreserve calls.
754 * 2. Use the staged CS to do the encapsulated signaling jobs.
758 * 3. Use WAIT/COLLECTIVE WAIT CS along with HL_CS_FLAGS_ENCAP_SIGNALS flag
779 * Sequence number of a staged submission CS
788 * 1. CS with encapsulated signals:
799 /* Encapsulated signals number */
807 /* Number of chunks in restore phase array. Maximum number is
812 /* Number of chunks in execution array. Maximum number is
817 /* timeout in seconds - valid only if HL_CS_FLAGS_CUSTOM_TIMEOUT
825 /* Context ID - Currently not in use */
832 * seq holds the sequence number of the CS to pass to wait
872 * In case of wait_cs holds the CS sequence number.
873 * In case of wait for multi CS hold a user pointer to
874 * an array of CS sequence numbers
901 /* Context ID - Currently not in use */
911 /* Multi CS API info- valid entries in multi-CS array */
931 * for wait_cs: timestamp of CS completion
932 * for wait_multi_cs: timestamp of FIRST CS completion
935 /* multi CS completion bitmap */
964 /* HL_MEM_OP_ALLOC- allocate device memory */
970 /* HL_MEM_OP_FREE - free device memory */
976 /* HL_MEM_OP_MAP - map device memory */
992 /* HL_MEM_OP_MAP - map host memory */
1010 /* HL_MEM_OP_MAP_BLOCK - map a hw block */
1021 /* HL_MEM_OP_UNMAP - unmap host memory */
1032 /* Context ID - Currently not in use */
1134 /* Number of event types selection */
1179 /* Context ID - Currently not in use */
1185 * - H/W IP information
1186 * - Current dram usage
1189 * information. The user should supply a pointer to a user-allocated memory
1202 * - Request a Command Buffer
1203 * - Destroy a Command Buffer
1205 * The command buffers are memory blocks that reside in DMA-able address
1209 * When creating a new CB, the IOCTL returns a handle of it, and the user-space
1226 * of JOBS. That set of JOBS constitutes a CS object.
1230 * The CS IOCTL will receive two sets of JOBS. One set is for "restore" phase
1232 * The JOBS on the "restore" phase are enqueued only after context-switch
1233 * (or if its the first CS for this context). The user can also order the
1236 * There are two types of queues - external and internal. External queues
1242 * through the CB ioctl and give the CB's handle to the CS ioctl. For jobs on
1245 * that buffer to the CS ioctl.
1247 * This IOCTL is asynchronous in regard to the actual execution of the CS. This
1249 * relevant queues. Therefore, the user mustn't assume the CS has been completed
1252 * Upon successful enqueue, the IOCTL returns a sequence number which the user
1253 * can use with the "Wait for CS" IOCTL to check whether the handle's CS
1254 * external JOBS have been completed. Note that if the CS has internal JOBS
1256 * report that the CS has finished executing BEFORE the internal JOBS have
1259 * Even though the sequence number increments per CS, the user can NOT
1260 * automatically assume that if CS with sequence number N finished, then CS
1261 * with sequence number N-1 also finished. The user can make this assumption if
1262 * and only if CS N and CS N-1 are exactly the same (same CBs for the same
1271 * The user can call this IOCTL with a handle it received from the CS IOCTL
1272 * to wait until the handle's CS has finished executing. The user will wait
1273 * inside the kernel until the CS has finished or until the user-requested
1277 * the status of the CS and return immediately
1282 * EINTR - Kernel waiting has been interrupted, e.g. due to OS signal
1284 * ETIMEDOUT - The CS has caused a timeout on the device
1285 * EIO - The CS was aborted (usually because the device was reset)
1286 * ENODEV - The device wants to do hard-reset (so user need to close FD)
1291 * HL_WAIT_CS_STATUS_COMPLETED - The CS has been completed successfully (0)
1292 * HL_WAIT_CS_STATUS_BUSY - The CS is still executing (0)
1293 * HL_WAIT_CS_STATUS_TIMEDOUT - The CS has caused a timeout on the device
1295 * HL_WAIT_CS_STATUS_ABORTED - The CS was aborted, usually because the
1304 * - Map host memory to device MMU
1305 * - Unmap host memory from device MMU
1310 * to allocate the memory in user-space (malloc/new). The driver pins the
1322 * - Enable/disable the ETR/ETF/FUNNEL/STM/BMON/SPMU debug traces
1339 * set the device into non-debug mode, i.e. disable debug mode.