• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:query +full:- +full:gpu

47 /*--------------------------------------------------------------------------*/
48 /* --------------------------- Defines ------------------------------------ */
49 /*--------------------------------------------------------------------------*/
70 /*--------------------------------------------------------------------------*/
71 /* ----------------------------- Enums ------------------------------------ */
72 /*--------------------------------------------------------------------------*/
87 /** DMA-buf fd handle */
96 /** Define known types of GPU VM VA ranges */
107 /*--------------------------------------------------------------------------*/
108 /* -------------------------- Datatypes ----------------------------------- */
109 /*--------------------------------------------------------------------------*/
120 * Define GPU Context type as pointer to opaque structure
121 * Example of GPU Context is the "rendering" context associated
152 /*--------------------------------------------------------------------------*/
153 /* -------------------------- Structures ---------------------------------- */
154 /*--------------------------------------------------------------------------*/
168 * for physical back-up storage (e.g. for displayable surface).
199 * ASIC-specific tiling information (also used by DCE).
213 * to query such information as part of 'sharing' buffers mechanism
224 * for physical back-up storage.
309 * - The size is in units of dwords (4 bytes).
310 * - Could be 0
389 * Structure which provide information about GPU VM MC Address space
431 * Describe GPU h/w info needed for UMD correct initialization
466 /** Frequency of GPU Counter */
499 /*--------------------------------------------------------------------------*/
500 /*------------------------- Functions --------------------------------------*/
501 /*--------------------------------------------------------------------------*/
510 * \param fd - \c [in] File descriptor for AMD GPU device
516 * \param major_version - \c [out] Major version of library. It is assumed
519 * \param minor_version - \c [out] Minor version of library
520 * \param device_handle - \c [out] Pointer to opaque context which should
526 * <0 - Negative POSIX Error code
543 * the only use-case where not-deduplicating devices make sense is
556 * \param device_handle - \c [in] Context associated with file
557 * descriptor for AMD GPU device
562 * <0 - Negative POSIX Error code
571 * /param device_handle - \c [in] Device handle.
588 * Allocate memory to be used by UMD for GPU related operations
590 * \param dev - \c [in] Device handle.
592 * \param alloc_buffer - \c [in] Pointer to the structure describing an
594 * \param buf_handle - \c [out] Allocated buffer handle
597 * <0 - Negative POSIX Error code
608 * \param dev - \c [in] Device handle. See #amdgpu_device_initialize()
609 * \param buf_handle - \c [in] Buffer handle
610 * \param info - \c [in] Metadata to associated with buffer
613 * <0 - Negative POSIX Error code
619 * Query buffer information including metadata previusly associated with
622 * \param dev - \c [in] Device handle.
624 * \param buf_handle - \c [in] Buffer handle
625 * \param info - \c [out] Structure describing buffer
628 * <0 - Negative POSIX Error code
638 * \param dev - \c [in] Device handle.
640 * \param buf_handle - \c [in] Buffer handle
641 * \param type - \c [in] Type of handle requested
642 * \param shared_handle - \c [out] Special "shared" handle
645 * <0 - Negative POSIX Error code
657 * \param dev - \c [in] Device handle.
659 * \param type - \c [in] Type of handle requested
660 * \param shared_handle - \c [in] Shared handle received as result "import"
662 * \param output - \c [out] Pointer to structure with information
666 * <0 - Negative POSIX Error code
680 * Request GPU access to user allocated memory e.g. via "malloc"
682 * \param dev - [in] Device handle. See #amdgpu_device_initialize()
683 * \param cpu - [in] CPU address of user allocated memory which we
684 * want to map to GPU address space (make GPU accessible)
686 * \param size - [in] Size of allocation (must be correctly aligned)
687 * \param buf_handle - [out] Buffer handle for the userptr memory
692 * <0 - Negative POSIX Error code
696 * "locked" / make non-pageable. The purpose of this call is to provide
697 * opportunity for GPU get access to this resource during submission.
717 * \param dev - [in] Device handle. See #amdgpu_device_initialize()
718 * \param cpu - [in] CPU address of user allocated memory which we
719 * want to map to GPU address space (make GPU accessible)
721 * \param size - [in] Size of allocation (must be correctly aligned)
722 * \param buf_handle - [out] Buffer handle for the userptr memory
724 * \param offset_in_bo - [out] offset in this BO for this user memory
728 * <0 - Negative POSIX Error code
740 * \param dev - \c [in] Device handle. See #amdgpu_device_initialize()
741 * \param buf_handle - \c [in] Buffer handle to free
744 * <0 - Negative POSIX Error code
750 * more GPU access
760 * \param bo - \c [in] Buffer object handle to increase the reference count
768 * Request CPU access to GPU accessible memory
770 * \param buf_handle - \c [in] Buffer handle
771 * \param cpu - \c [out] CPU address to be used for access
774 * <0 - Negative POSIX Error code
782 * Release CPU access to GPU memory
784 * \param buf_handle - \c [in] Buffer handle
787 * <0 - Negative POSIX Error code
797 * \param dev - \c [in] Device handle. See #amdgpu_device_initialize()
798 * \param buf_handle - \c [in] Buffer handle.
799 * \param timeout_ns - Timeout in nanoseconds.
800 * \param buffer_busy - 0 if buffer is idle, all GPU access was completed
801 * and no GPU access is scheduled.
802 * 1 GPU access is in fly or scheduled
804 * \return 0 - on success
805 * <0 - Negative POSIX Error code
814 * \param dev - \c [in] Device handle.
816 * \param number_of_buffers - \c [in] Number of BOs in the list
817 * \param buffers - \c [in] List of BO handles
818 * \param result - \c [out] Created BO list handle
821 * <0 - Negative POSIX Error code
833 * \param bo_list - \c [in] BO list handle.
836 * <0 - Negative POSIX Error code
845 * \param dev - \c [in] Device handle.
847 * \param number_of_resources - \c [in] Number of BOs in the list
848 * \param resources - \c [in] List of BO handles
849 * \param resource_prios - \c [in] Optional priority for each handle
850 * \param result - \c [out] Created BO list handle
853 * <0 - Negative POSIX Error code
866 * \param handle - \c [in] BO list handle.
869 * <0 - Negative POSIX Error code
878 * \param handle - \c [in] BO list handle
879 * \param number_of_resources - \c [in] Number of BOs in the list
880 * \param resources - \c [in] List of BO handles
881 * \param resource_prios - \c [in] Optional priority for each handle
884 * <0 - Negative POSIX Error code
894 * GPU Execution context
899 * Create GPU execution Context
901 * For the purpose of GPU Scheduler and GPU Robustness extensions it is
908 * \param dev - \c [in] Device handle. See #amdgpu_device_initialize()
909 * \param priority - \c [in] Context creation flags. See AMDGPU_CTX_PRIORITY_*
910 * \param context - \c [out] GPU Context handle
913 * <0 - Negative POSIX Error code
922 * Create GPU execution Context
935 * Destroy GPU execution context when not needed any more
937 * \param context - \c [in] GPU Context handle
940 * <0 - Negative POSIX Error code
950 * \param dev - \c [in] device handle
951 * \param context - \c [in] context handle for context id
952 * \param master_fd - \c [in] The master fd to authorize the override.
953 * \param priority - \c [in] The priority to assign to the context.
963 * Set or query the stable power state for GPU profiling.
965 * \param dev - \c [in] device handle
966 * \param op - \c [in] AMDGPU_CTX_OP_{GET,SET}_STABLE_PSTATE
967 * \param flags - \c [in] AMDGPU_CTX_STABLE_PSTATE_*
968 * \param out_flags - \c [out] output current stable pstate
978 * Query reset state for the specific GPU Context
980 * \param context - \c [in] GPU Context handle
981 * \param state - \c [out] One of AMDGPU_CTX_*_RESET
982 * \param hangs - \c [out] Number of hangs caused by the context.
985 * <0 - Negative POSIX Error code
994 * Query reset state for the specific GPU Context.
996 * \param context - \c [in] GPU Context handle
997 * \param flags - \c [out] A combination of AMDGPU_CTX_QUERY2_FLAGS_*
1000 * <0 - Negative POSIX Error code
1016 * Kernel driver could use GPU Scheduler to make decision when physically
1019 * from the same GPU context to the same ip:ip_instance:ring will be executed in
1027 * \param dev - \c [in] Device handle.
1029 * \param context - \c [in] GPU Context
1030 * \param flags - \c [in] Global submission flags
1031 * \param ibs_request - \c [in/out] Pointer to submission requests.
1035 * \param number_of_requests - \c [in] Number of submission requests
1038 * <0 - Negative POSIX Error code
1055 * Query status of Command Buffer Submission
1057 * \param fence - \c [in] Structure describing fence to query
1058 * \param timeout_ns - \c [in] Timeout value to wait
1059 * \param flags - \c [in] Flags for the query
1060 * \param expired - \c [out] If fence expired or not.\n
1062 * !0 - otherwise
1065 * <0 - Negative POSIX Error code
1082 * \param fences - \c [in] The fence array to wait
1083 * \param fence_count - \c [in] The fence count
1084 * \param wait_all - \c [in] If true, wait all fences to be signaled,
1086 * \param timeout_ns - \c [in] The timeout to wait, in nanoseconds
1087 * \param status - \c [out] '1' for signaled, '0' for timeout
1088 * \param first - \c [out] the index of the first signaled fence from @fences
1091 * <0 - Negative POSIX Error code
1103 * Query / Info API
1108 * Query allocation size alignments
1110 * UMD should query information about GPU VM MC size alignments requirements
1114 * \param dev - \c [in] Device handle. See #amdgpu_device_initialize()
1115 * \param info - \c [out] Pointer to structure to get size alignment
1119 * <0 - Negative POSIX Error code
1127 * Query firmware versions
1129 * \param dev - \c [in] Device handle. See #amdgpu_device_initialize()
1130 * \param fw_type - \c [in] AMDGPU_INFO_FW_*
1131 * \param ip_instance - \c [in] Index of the IP block of the same type.
1132 * \param index - \c [in] Index of the engine. (for SDMA and MEC)
1133 * \param version - \c [out] Pointer to to the "version" return value
1134 * \param feature - \c [out] Pointer to to the "feature" return value
1137 * <0 - Negative POSIX Error code
1145 * Query the number of HW IP instances of a certain type.
1147 * \param dev - \c [in] Device handle. See #amdgpu_device_initialize()
1148 * \param type - \c [in] Hardware IP block type = AMDGPU_HW_IP_*
1149 * \param count - \c [out] Pointer to structure to get information
1152 * <0 - Negative POSIX Error code
1158 * Query engine information
1160 * This query allows UMD to query information different engines and their
1163 * \param dev - \c [in] Device handle. See #amdgpu_device_initialize()
1164 * \param type - \c [in] Hardware IP block type = AMDGPU_HW_IP_*
1165 * \param ip_instance - \c [in] Index of the IP block of the same type.
1166 * \param info - \c [out] Pointer to structure to get information
1169 * <0 - Negative POSIX Error code
1176 * Query heap information
1178 * This query allows UMD to query potentially available memory resources and
1181 * \param dev - \c [in] Device handle. See #amdgpu_device_initialize()
1182 * \param heap - \c [in] Heap type
1183 * \param info - \c [in] Pointer to structure to get needed information
1186 * <0 - Negative POSIX Error code
1195 * \param dev - \c [in] Device handle. See #amdgpu_device_initialize()
1196 * \param id - \c [in] Mode object ID
1197 * \param result - \c [in] Pointer to the CRTC ID
1200 * <0 - Negative POSIX Error code
1207 * Query GPU H/w Info
1209 * Query hardware specific information
1211 * \param dev - \c [in] Device handle. See #amdgpu_device_initialize()
1212 * \param heap - \c [in] Heap type
1213 * \param info - \c [in] Pointer to structure to get needed information
1216 * <0 - Negative POSIX Error code
1223 * Query hardware or driver information.
1225 * The return size is query-specific and depends on the "info_id" parameter.
1228 * \param dev - \c [in] Device handle. See #amdgpu_device_initialize()
1229 * \param info_id - \c [in] AMDGPU_INFO_*
1230 * \param size - \c [in] Size of the returned value.
1231 * \param value - \c [out] Pointer to the return value.
1234 * <0 - Negative POSIX error code
1241 * Query hardware or driver information.
1243 * The return size is query-specific and depends on the "info_id" parameter.
1246 * \param dev - \c [in] Device handle. See #amdgpu_device_initialize()
1247 * \param info - \c [in] amdgpu_sw_info_*
1248 * \param value - \c [out] Pointer to the return value.
1251 * <0 - Negative POSIX error code
1258 * Query information about GDS
1260 * \param dev - \c [in] Device handle. See #amdgpu_device_initialize()
1261 * \param gds_info - \c [out] Pointer to structure to get GDS information
1264 * <0 - Negative POSIX Error code
1271 * Query information about sensor.
1273 * The return size is query-specific and depends on the "sensor_type"
1276 * \param dev - \c [in] Device handle. See #amdgpu_device_initialize()
1277 * \param sensor_type - \c [in] AMDGPU_INFO_SENSOR_*
1278 * \param size - \c [in] Size of the returned value.
1279 * \param value - \c [out] Pointer to the return value.
1282 * <0 - Negative POSIX Error code
1289 * Query information about video capabilities
1293 * \param dev - \c [in] Device handle. See #amdgpu_device_initialize()
1294 * \param caps_type - \c [in] AMDGPU_INFO_VIDEO_CAPS_DECODE(ENCODE)
1295 * \param size - \c [in] Size of the returned value.
1296 * \param value - \c [out] Pointer to the return value.
1299 * <0 - Negative POSIX Error code
1306 * Query information about VM faults
1310 * \param dev - \c [in] Device handle. See #amdgpu_device_initialize()
1311 * \param size - \c [in] Size of the returned value.
1312 * \param value - \c [out] Pointer to the return value.
1315 * <0 - Negative POSIX Error code
1322 * Read a set of consecutive memory-mapped registers.
1325 * \param dev - \c [in] Device handle. See #amdgpu_device_initialize(
1326 * \param dword_offset - \c [in] Register offset in dwords
1327 * \param count - \c [in] The number of registers to read starting
1329 * \param instance - \c [in] GRBM_GFX_INDEX selector. It may have other
1331 * \param flags - \c [in] Flags with additional information.
1332 * \param values - \c [out] The pointer to return values.
1335 * <0 - Negative POSIX error code
1352 * \param dev - [in] Device handle. See #amdgpu_device_initialize()
1353 * \param va_range_type - \c [in] Type of MC va range from which to allocate
1354 * \param size - \c [in] Size of range. Size must be correctly* aligned.
1357 * \param va_base_alignment - \c [in] Overwrite base address alignment
1358 * requirement for GPU VM MC virtual
1362 * \param va_base_required - \c [in] Specified required va base address.
1366 * \param va_base_allocated - \c [out] On return: Allocated VA base to be used
1368 * \param va_range_handle - \c [out] On return: Handle assigned to allocation
1369 * \param flags - \c [in] flags for special VA range
1372 * >0 - AMD specific error code\n
1373 * <0 - Negative POSIX Error code
1380 * It is client responsibility to correctly handle multi-GPU cases and to pass
1398 * \param va_range_handle - \c [in] Handle assigned to VA allocation
1401 * >0 - AMD specific error code\n
1402 * <0 - Negative POSIX Error code
1413 * Query virtual address range
1415 * UMD can query GPU VM range supported by each device
1418 * \param dev - [in] Device handle. See #amdgpu_device_initialize()
1419 * \param type - \c [in] Type of virtual address range
1420 * \param offset - \c [out] Start offset of virtual address range
1421 * \param size - \c [out] Size of virtual address range
1424 * <0 - Negative POSIX Error code
1467 * \param bo - \c [in] BO handle
1468 * \param offset - \c [in] Start offset to map
1469 * \param size - \c [in] Size to map
1470 * \param addr - \c [in] Start virtual address.
1471 * \param flags - \c [in] Supported flags for mapping/unmapping
1472 * \param ops - \c [in] AMDGPU_VA_OP_MAP or AMDGPU_VA_OP_UNMAP
1475 * <0 - Negative POSIX Error code
1489 * This is not a simple drop-in extension for amdgpu_bo_va_op; instead, all
1493 * \param dev - \c [in] device handle
1494 * \param bo - \c [in] BO handle (may be NULL)
1495 * \param offset - \c [in] Start offset to map
1496 * \param size - \c [in] Size to map
1497 * \param addr - \c [in] Start virtual address.
1498 * \param flags - \c [in] Supported flags for mapping/unmapping
1499 * \param ops - \c [in] AMDGPU_VA_OP_MAP or AMDGPU_VA_OP_UNMAP
1502 * <0 - Negative POSIX Error code
1517 * \param sem - \c [out] semaphore handle
1520 * <0 - Negative POSIX Error code
1528 * \param context - \c [in] GPU Context
1529 * \param ip_type - \c [in] Hardware IP block type = AMDGPU_HW_IP_*
1530 * \param ip_instance - \c [in] Index of the IP block of the same type
1531 * \param ring - \c [in] Specify ring index of the IP
1532 * \param sem - \c [in] semaphore handle
1535 * <0 - Negative POSIX Error code
1547 * \param context - \c [in] GPU Context
1548 * \param ip_type - \c [in] Hardware IP block type = AMDGPU_HW_IP_*
1549 * \param ip_instance - \c [in] Index of the IP block of the same type
1550 * \param ring - \c [in] Specify ring index of the IP
1551 * \param sem - \c [in] semaphore handle
1554 * <0 - Negative POSIX Error code
1566 * \param sem - \c [in] semaphore handle
1569 * <0 - Negative POSIX Error code
1577 * \param dev - \c [in] Device handle. See #amdgpu_device_initialize()
1587 * \param dev - \c [in] device handle
1588 * \param flags - \c [in] flags that affect creation
1589 * \param syncobj - \c [out] sync object handle
1592 * <0 - Negative POSIX Error code
1602 * \param dev - \c [in] device handle
1603 * \param syncobj - \c [out] sync object handle
1606 * <0 - Negative POSIX Error code
1614 * \param dev - \c [in] device handle
1615 * \param syncobj - \c [in] sync object handle
1618 * <0 - Negative POSIX Error code
1627 * \param dev - \c [in] device handle
1628 * \param syncobjs - \c [in] array of sync object handles
1629 * \param syncobj_count - \c [in] number of handles in syncobjs
1632 * <0 - Negative POSIX Error code
1641 * \param dev - \c [in] device handle
1642 * \param syncobjs - \c [in] array of sync object handles
1643 * \param syncobj_count - \c [in] number of handles in syncobjs
1646 * <0 - Negative POSIX Error code
1655 * \param dev - \c [in] device handle
1656 * \param syncobjs - \c [in] array of sync object handles
1657 * \param points - \c [in] array of timeline points
1658 * \param syncobj_count - \c [in] number of handles in syncobjs
1661 * <0 - Negative POSIX Error code
1672 * \param dev - \c [in] self-explanatory
1673 * \param handles - \c [in] array of sync object handles
1674 * \param num_handles - \c [in] self-explanatory
1675 * \param timeout_nsec - \c [in] self-explanatory
1676 * \param flags - \c [in] a bitmask of DRM_SYNCOBJ_WAIT_FLAGS_*
1677 * \param first_signaled - \c [in] self-explanatory
1680 * -ETIME - Timeout
1681 * <0 - Negative POSIX Error code
1692 * \param dev - \c [in] self-explanatory
1693 * \param handles - \c [in] array of sync object handles
1694 * \param points - \c [in] array of sync points to wait
1695 * \param num_handles - \c [in] self-explanatory
1696 * \param timeout_nsec - \c [in] self-explanatory
1697 * \param flags - \c [in] a bitmask of DRM_SYNCOBJ_WAIT_FLAGS_*
1698 * \param first_signaled - \c [in] self-explanatory
1701 * -ETIME - Timeout
1702 * <0 - Negative POSIX Error code
1711 * Query sync objects payloads.
1713 * \param dev - \c [in] self-explanatory
1714 * \param handles - \c [in] array of sync object handles
1715 * \param points - \c [out] array of sync points returned, which presents
1717 * \param num_handles - \c [in] self-explanatory
1720 * -ETIME - Timeout
1721 * <0 - Negative POSIX Error code
1728 * Query sync objects last signaled or submitted point.
1730 * \param dev - \c [in] self-explanatory
1731 * \param handles - \c [in] array of sync object handles
1732 * \param points - \c [out] array of sync points returned, which presents
1734 * \param num_handles - \c [in] self-explanatory
1735 * \param flags - \c [in] a bitmask of DRM_SYNCOBJ_QUERY_FLAGS_*
1738 * -ETIME - Timeout
1739 * <0 - Negative POSIX Error code
1749 * \param dev - \c [in] device handle
1750 * \param syncobj - \c [in] sync object handle
1751 * \param shared_fd - \c [out] shared file descriptor.
1754 * <0 - Negative POSIX Error code
1763 * \param dev - \c [in] device handle
1764 * \param shared_fd - \c [in] shared file descriptor.
1765 * \param syncobj - \c [out] sync object handle
1768 * <0 - Negative POSIX Error code
1778 * \param dev - \c [in] device handle
1779 * \param syncobj - \c [in] sync object handle
1780 * \param sync_file_fd - \c [out] sync_file file descriptor.
1783 * <0 - Negative POSIX Error code
1793 * \param dev - \c [in] device handle
1794 * \param syncobj - \c [in] sync object handle
1795 * \param sync_file_fd - \c [in] sync_file file descriptor.
1798 * <0 - Negative POSIX Error code
1807 * \param dev - \c [in] device handle
1808 * \param syncobj - \c [in] sync object handle
1809 * \param point - \c [in] timeline point
1810 * \param flags - \c [in] flags
1811 * \param sync_file_fd - \c [out] sync_file file descriptor.
1814 * <0 - Negative POSIX Error code
1826 * \param dev - \c [in] device handle
1827 * \param syncobj - \c [in] sync object handle
1828 * \param point - \c [in] timeline point
1829 * \param sync_file_fd - \c [in] sync_file file descriptor.
1832 * <0 - Negative POSIX Error code
1843 * \param dev - \c [in] device handle
1844 * \param dst_handle - \c [in] sync object handle
1845 * \param dst_point - \c [in] timeline point, 0 presents dst is binary
1846 * \param src_handle - \c [in] sync object handle
1847 * \param src_point - \c [in] timeline point, 0 presents src is binary
1848 * \param flags - \c [in] flags
1851 * <0 - Negative POSIX Error code
1868 * <0 - Negative POSIX Error code
1878 * \param dev - \c [in] device handle
1879 * \param context - \c [in] context handle for context id
1880 * \param bo_list_handle - \c [in] request bo list handle (0 for none)
1881 * \param num_chunks - \c [in] number of CS chunks to submit
1882 * \param chunks - \c [in] array of CS chunks
1883 * \param seq_no - \c [out] output sequence number for submission.
1886 * <0 - Negative POSIX Error code
1903 * \param dev - \c [in] device handle
1904 * \param context - \c [in] context handle for context id
1905 * \param bo_list_handle - \c [in] raw bo list handle (0 for none)
1906 * \param num_chunks - \c [in] number of CS chunks to submit
1907 * \param chunks - \c [in] array of CS chunks
1908 * \param seq_no - \c [out] output sequence number for submission.
1911 * <0 - Negative POSIX Error code
1929 * \param context - \c [in] GPU Context
1930 * \param flags - \c [in] TBD
1938 * \param context - \c [in] GPU Context
1939 * \param flags - \c [in] TBD