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

1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
3 * Copyright 2016-2022 HabanaLabs, Ltd.
15 * Defines that are asic-specific but constitutes as ABI between kernel driver
33 /* Max number of elements in timestamps registration buffers */
196 * stream id is a running number from 0 up to (N-1), where N is the number
653 * enum hl_goya_dma_direction - Direction of DMA operation inside a LIN_DMA packet that is
665 * @HL_DMA_ENUM_MAX: number of values in enum
680 * enum hl_device_status - Device status information.
711 * Notifier event values - for the notification mechanism and the HL_INFO_GET_EVENTS command
713 * HL_NOTIFIER_EVENT_TPC_ASSERT - Indicates TPC assert event
714 * HL_NOTIFIER_EVENT_UNDEFINED_OPCODE - Indicates undefined operation code
715 * HL_NOTIFIER_EVENT_DEVICE_RESET - Indicates device requires a reset
716 * HL_NOTIFIER_EVENT_CS_TIMEOUT - Indicates CS timeout error
717 * HL_NOTIFIER_EVENT_DEVICE_UNAVAILABLE - Indicates device is unavailable
718 * HL_NOTIFIER_EVENT_USER_ENGINE_ERR - Indicates device engine in error state
719 * HL_NOTIFIER_EVENT_GENERAL_HW_ERR - Indicates device HW error
731 * HW_IP_INFO - Receive information about different IP blocks in the
733 * HL_INFO_HW_EVENTS - Receive an array describing how many times each event
735 * HL_INFO_DRAM_USAGE - Retrieve the dram usage inside the device and of the
738 * HL_INFO_HW_IDLE - Retrieve information about the idle status of each
740 * HL_INFO_DEVICE_STATUS - Retrieve the device's status. This opcode doesn't
742 * HL_INFO_DEVICE_UTILIZATION - Retrieve the total utilization of the device
747 * HL_INFO_HW_EVENTS_AGGREGATE - Receive an array describing how many times each
749 * HL_INFO_CLK_RATE - Retrieve the current and maximum clock rate
752 * HL_INFO_RESET_COUNT - Retrieve the counts of the soft and hard reset
755 * HL_INFO_TIME_SYNC - Retrieve the device's time alongside the host's time
757 * HL_INFO_CS_COUNTERS - Retrieve command submission counters
758 * HL_INFO_PCI_COUNTERS - Retrieve PCI counters
759 * HL_INFO_CLK_THROTTLE_REASON - Retrieve clock throttling reason
760 * HL_INFO_SYNC_MANAGER - Retrieve sync manager info per dcore
761 * HL_INFO_TOTAL_ENERGY - Retrieve total energy consumption
762 * HL_INFO_PLL_FREQUENCY - Retrieve PLL frequency
763 * HL_INFO_POWER - Retrieve power information
764 * HL_INFO_OPEN_STATS - Retrieve info regarding recent device open calls
765 * HL_INFO_DRAM_REPLACED_ROWS - Retrieve DRAM replaced rows info
766 * HL_INFO_DRAM_PENDING_ROWS - Retrieve DRAM pending rows num
767 * HL_INFO_LAST_ERR_OPEN_DEV_TIME - Retrieve timestamp of the last time the device was opened
768 * and CS timeout or razwi error occurred.
769 * HL_INFO_CS_TIMEOUT_EVENT - Retrieve CS timeout timestamp and its related CS sequence number.
770 * HL_INFO_RAZWI_EVENT - Retrieve parameters of razwi:
775 * HL_INFO_DEV_MEM_ALLOC_PAGE_SIZES - Retrieve valid page sizes for device memory allocation
776 * HL_INFO_SECURED_ATTESTATION - Retrieve attestation report of the boot.
777 * HL_INFO_REGISTER_EVENTFD - Register eventfd for event notifications.
778 * HL_INFO_UNREGISTER_EVENTFD - Unregister eventfd
779 * HL_INFO_GET_EVENTS - Retrieve the last occurred events
780 * HL_INFO_UNDEFINED_OPCODE_EVENT - Retrieve last undefined opcode error information.
820 * struct hl_info_hw_ip_info - hardware information on various IPs in the ASIC
827 * @num_of_events: The number of events that can be received from the f/w. This
834 * @decoder_enabled_mask: Bit-mask that represents which decoders are enabled.
846 * @tpc_enabled_mask: Bit-mask that represents which TPCs are enabled. Relevant
854 * @tpc_enabled_mask_ext: Bit-mask that represents which TPCs are enabled.
857 * @edma_enabled_mask: Bit-mask that represents which EDMAs are enabled.
859 * @number_of_user_interrupts: The number of interrupts that are available to the userspace
942 * struct hl_info_pci_counters - pci counters
964 * struct hl_info_clk_throttle - clock throttling reason
966 * @clk_throttling_timestamp_us: represents CPU timestamp in microseconds of the start-event
977 * struct hl_info_energy - device energy information
991 * struct hl_open_stats_info - device open statistics information
1006 * struct hl_power_info - power information
1014 * struct hl_info_sync_manager - sync manager information
1027 * struct hl_info_cs_counters - command submission counters
1036 * @total_max_cs_in_flight_drop_cnt: total dropped due to maximum CS in-flight
1037 * @ctx_max_cs_in_flight_drop_cnt: context dropped due to maximum CS in-flight
1057 * struct hl_info_last_err_open_dev_time - last error boot information.
1065 * struct hl_info_cs_timeout_event - last CS timeout information.
1066 * @timestamp: timestamp when last CS timeout event occurred.
1067 * @seq: sequence number of last CS timeout event.
1078 * struct hl_info_razwi_event - razwi information.
1104 * struct hl_info_undefined_opcode_event - info about last undefined opcode error
1108 * filled with values, it means the execution was in Lower-CP.
1111 * @cb_addr_streams_len: num of streams - actual len of cb_addr_streams array.
1113 * in Upper-CP (specific stream) and equal to 4 incase
1114 * of undefined opcode in Lower-CP.
1115 * @engine_id: engine-id that the error occurred on
1117 * MAX_QMAN_STREAMS_INFO it means the error occurred on a Lower-CP.
1130 * struct hl_info_dev_memalloc_page_sizes - valid page sizes in device mem alloc information.
1139 #define SEC_PCR_QUOTE_BUF_SZ 510 /* (512 - 2) 2 bytes used for size */
1140 #define SEC_SIGNATURE_BUF_SZ 255 /* (256 - 1) 1 byte used for size */
1141 #define SEC_PUB_DATA_BUF_SZ 510 /* (512 - 2) 2 bytes used for size */
1142 #define SEC_CERTIFICATE_BUF_SZ 2046 /* (2048 - 2) 2 bytes used for size */
1145 * struct hl_info_sec_attest - attestation report of the boot
1146 * @nonce: number only used once. random number provided by host. this also passed to the quote
1151 * @pcr_num_reg: number of PCR registers in the pcr_data array
1185 * struct hl_info_args - Main structure to retrieve device related information.
1194 * @period_ms: Period value, in milliseconds, for utilization rate in range 100ms - 1000ms in 100 ms
1202 * @sec_attest_nonce: Nonce number used for attestation report.
1231 #define HL_MAX_CB_SIZE (0x200000 - 32)
1250 /* Context ID - Currently not in use */
1286 * CB, the user invokes - “memory ioctl” to map the user memory into a
1290 * increases the PCI-DMA queues throughput. This CB allocation method
1291 * also reduces the use of Linux DMA-able memory pool. Which are limited
1292 * and used by other Linux sub-systems.
1297 * This structure size must always be fixed to 64-bytes for backward
1321 * signal CS sequence numbers. The wait described by
1331 * This is the CS sequence which has the encapsulated signals.
1348 * Number of entries in signal_seq_arr
1391 * The encapsulated signals CS is merged into the existing CS ioctls.
1393 * 1. Reserve signals, set the CS type to HL_CS_FLAGS_RESERVE_SIGNALS_ONLY
1398 * CS type, note that this might fail if out-of-sync happened to the SOB
1400 * reserve-unreserve calls.
1401 * 2. Use the staged CS to do the encapsulated signaling jobs.
1405 * 3. Use WAIT/COLLECTIVE WAIT CS along with HL_CS_FLAGS_ENCAP_SIGNALS flag
1413 * The engine cores CS is merged into the existing CS ioctls.
1446 /* number of engine cores in engine_cores array */
1456 * Sequence number of a staged submission CS
1465 * 1. CS with encapsulated signals:
1476 /* Encapsulated signals number */
1484 /* Number of chunks in restore phase array. Maximum number is
1489 /* Number of chunks in execution array. Maximum number is
1494 /* timeout in seconds - valid only if HL_CS_FLAGS_CUSTOM_TIMEOUT
1502 /* Context ID - Currently not in use */
1510 * seq holds the sequence number of the CS to pass to wait
1562 * In case of wait_cs holds the CS sequence number.
1563 * In case of wait for multi CS hold a user pointer to
1564 * an array of CS sequence numbers
1596 /* Context ID - Currently not in use */
1613 /* Multi CS API info- valid entries in multi-CS array */
1663 * for wait_cs: timestamp of CS completion
1664 * for wait_multi_cs: timestamp of FIRST CS completion
1667 /* multi CS completion bitmap */
1692 /* Opcode to create DMA-BUF object for an existing device memory allocation
1693 * and to export an FD of that DMA-BUF back to the caller
1713 * structure hl_mem_in - structure that handle input args for memory IOCTL
1717 * For the HL_MEM_OP_EXPORT_DMABUF_FD opcode, this field holds the DMA-BUF file/FD flags.
1718 * @ctx_id: context ID - currently not in use.
1719 * @num_of_elements: number of timestamp elements used only with HL_MEM_OP_TS_ALLOC opcode.
1735 * structure for free-ing device memory (used with the HL_MEM_OP_FREE op)
1845 * DMA-BUF object that was created to describe a memory
1926 /* Number of event types selection */
1975 /* Context ID - Currently not in use */
1981 * - H/W IP information
1982 * - Current dram usage
1985 * information. The user should supply a pointer to a user-allocated memory
1998 * - Request a Command Buffer
1999 * - Destroy a Command Buffer
2001 * The command buffers are memory blocks that reside in DMA-able address
2005 * When creating a new CB, the IOCTL returns a handle of it, and the user-space
2022 * of JOBS. That set of JOBS constitutes a CS object.
2026 * The CS IOCTL will receive two sets of JOBS. One set is for "restore" phase
2028 * The JOBS on the "restore" phase are enqueued only after context-switch
2029 * (or if its the first CS for this context). The user can also order the
2033 * There are two types of queues - external and internal. External queues
2044 * through the CB ioctl and give the CB's handle to the CS ioctl. For jobs on
2047 * that buffer to the CS ioctl.
2050 * This IOCTL is asynchronous in regard to the actual execution of the CS. This
2052 * relevant queues. Therefore, the user mustn't assume the CS has been completed
2055 * Upon successful enqueue, the IOCTL returns a sequence number which the user
2056 * can use with the "Wait for CS" IOCTL to check whether the handle's CS
2057 * non-internal JOBS have been completed. Note that if the CS has internal JOBS
2059 * report that the CS has finished executing BEFORE the internal JOBS have
2062 * Even though the sequence number increments per CS, the user can NOT
2063 * automatically assume that if CS with sequence number N finished, then CS
2064 * with sequence number N-1 also finished. The user can make this assumption if
2065 * and only if CS N and CS N-1 are exactly the same (same CBs for the same
2074 * The user can call this IOCTL with a handle it received from the CS IOCTL
2075 * to wait until the handle's CS has finished executing. The user will wait
2076 * inside the kernel until the CS has finished or until the user-requested
2080 * the status of the CS and return immediately
2085 * EINTR - Kernel waiting has been interrupted, e.g. due to OS signal
2087 * ETIMEDOUT - The CS has caused a timeout on the device
2088 * EIO - The CS was aborted (usually because the device was reset)
2089 * ENODEV - The device wants to do hard-reset (so user need to close FD)
2094 * HL_WAIT_CS_STATUS_COMPLETED - The CS has been completed successfully (0)
2095 * HL_WAIT_CS_STATUS_BUSY - The CS is still executing (0)
2096 * HL_WAIT_CS_STATUS_TIMEDOUT - The CS has caused a timeout on the device
2098 * HL_WAIT_CS_STATUS_ABORTED - The CS was aborted, usually because the
2107 * - Map host memory to device MMU
2108 * - Unmap host memory from device MMU
2113 * to allocate the memory in user-space (malloc/new). The driver pins the
2125 * - Enable/disable the ETR/ETF/FUNNEL/STM/BMON/SPMU debug traces
2142 * set the device into non-debug mode, i.e. disable debug mode.