Lines Matching +full:cs +full:- +full:out
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
240 * HW_IP_INFO - Receive information about different IP blocks in the
242 * HL_INFO_HW_EVENTS - Receive an array describing how many times each event
244 * HL_INFO_DRAM_USAGE - Retrieve the dram usage inside the device and of the
247 * HL_INFO_HW_IDLE - Retrieve information about the idle status of each
249 * HL_INFO_DEVICE_STATUS - Retrieve the device's status. This opcode doesn't
251 * HL_INFO_DEVICE_UTILIZATION - Retrieve the total utilization of the device
256 * HL_INFO_HW_EVENTS_AGGREGATE - Receive an array describing how many times each
258 * HL_INFO_CLK_RATE - Retrieve the current and maximum clock rate
261 * HL_INFO_RESET_COUNT - Retrieve the counts of the soft and hard reset
264 * HL_INFO_TIME_SYNC - Retrieve the device's time alongside the host's time
266 * HL_INFO_CS_COUNTERS - Retrieve command submission counters
267 * HL_INFO_PCI_COUNTERS - Retrieve PCI counters
268 * HL_INFO_CLK_THROTTLE_REASON - Retrieve clock throttling reason
269 * HL_INFO_SYNC_MANAGER - Retrieve sync manager info per dcore
270 * HL_INFO_TOTAL_ENERGY - Retrieve total energy consumption
358 * struct hl_info_pci_counters - pci counters
373 * struct hl_info_clk_throttle - clock throttling reason
381 * struct hl_info_energy - device energy information
389 * struct hl_info_sync_manager - sync manager information
399 * struct hl_info_cs_counters - command submission counters
404 * @max_cs_in_flight_drop_cnt: dropped due to maximum CS in-flight
446 /* Context ID - Currently not in use */
448 /* Period value for utilization rate (100ms - 1000ms, in 100ms
463 #define HL_MAX_CB_SIZE (0x200000 - 32)
477 /* Context ID - Currently not in use */
490 struct hl_cb_out out; member
494 * This structure size must always be fixed to 64-bytes for backward
512 * signal CS sequence numbers. The wait described by this job
558 /* this holds address of array of hl_cs_chunk for store phase -
573 /* Number of chunks in restore phase array - Currently not in use */
579 /* Context ID - Currently not in use */
585 * seq holds the sequence number of the CS to pass to wait ioctl. All
596 struct hl_cs_out out; member
604 /* Context ID - Currently not in use */
623 struct hl_wait_cs_out out; member
642 /* HL_MEM_OP_ALLOC- allocate device memory */
648 /* HL_MEM_OP_FREE - free device memory */
654 /* HL_MEM_OP_MAP - map device memory */
670 /* HL_MEM_OP_MAP - map host memory */
688 /* HL_MEM_OP_UNMAP - unmap host memory */
699 /* Context ID - Currently not in use */
723 struct hl_mem_out out; member
804 /* Opcode for setting the device into or out of debug mode. The enable
830 /* Context ID - Currently not in use */
836 * - H/W IP information
837 * - Current dram usage
840 * information. The user should supply a pointer to a user-allocated memory
853 * - Request a Command Buffer
854 * - Destroy a Command Buffer
856 * The command buffers are memory blocks that reside in DMA-able address
860 * When creating a new CB, the IOCTL returns a handle of it, and the user-space
877 * of JOBS. That set of JOBS constitutes a CS object.
881 * The CS IOCTL will receive three sets of JOBS. One set is for "restore" phase,
883 * The JOBS on the "restore" phase are enqueued only after context-switch
884 * (or if its the first CS for this context). The user can also order the
887 * There are two types of queues - external and internal. External queues
893 * through the CB ioctl and give the CB's handle to the CS ioctl. For jobs on
896 * that buffer to the CS ioctl.
898 * This IOCTL is asynchronous in regard to the actual execution of the CS. This
900 * relevant queues. Therefore, the user mustn't assume the CS has been completed
904 * can use with the "Wait for CS" IOCTL to check whether the handle's CS
905 * external JOBS have been completed. Note that if the CS has internal JOBS
907 * report that the CS has finished executing BEFORE the internal JOBS have
910 * Even though the sequence number increments per CS, the user can NOT
911 * automatically assume that if CS with sequence number N finished, then CS
912 * with sequence number N-1 also finished. The user can make this assumption if
913 * and only if CS N and CS N-1 are exactly the same (same CBs for the same
922 * The user can call this IOCTL with a handle it received from the CS IOCTL
923 * to wait until the handle's CS has finished executing. The user will wait
924 * inside the kernel until the CS has finished or until the user-requested
928 * the status of the CS and return immediately
933 * EINTR - Kernel waiting has been interrupted, e.g. due to OS signal
935 * ETIMEDOUT - The CS has caused a timeout on the device
936 * EIO - The CS was aborted (usually because the device was reset)
937 * ENODEV - The device wants to do hard-reset (so user need to close FD)
941 * HL_WAIT_CS_STATUS_COMPLETED - The CS has been completed successfully (0)
942 * HL_WAIT_CS_STATUS_BUSY - The CS is still executing (0)
943 * HL_WAIT_CS_STATUS_TIMEDOUT - The CS has caused a timeout on the device
945 * HL_WAIT_CS_STATUS_ABORTED - The CS was aborted, usually because the
947 * HL_WAIT_CS_STATUS_INTERRUPTED - Waiting for the CS was interrupted (EINTR)
956 * - Map host memory to device MMU
957 * - Unmap host memory from device MMU
962 * to allocate the memory in user-space (malloc/new). The driver pins the
974 * - Enable/disable the ETR/ETF/FUNNEL/STM/BMON/SPMU debug traces
991 * set the device into non-debug mode, i.e. disable debug mode.
993 * The driver can decide to "kick out" the user if he abuses this interface.