Crate magma

Source

Structs§

magma_buffer_info
magma_buffer_offset
magma_command_descriptor
magma_exec_command_buffer
magma_exec_resource
magma_image_create_info
magma_image_info
magma_inline_command_buffer
magma_poll_item
magma_total_time_query_result
virtio_magma_buffer_clean_cache_ctrl
virtio_magma_buffer_clean_cache_resp
virtio_magma_buffer_export_ctrl
virtio_magma_buffer_export_resp
virtio_magma_buffer_get_cache_policy_ctrl
virtio_magma_buffer_get_cache_policy_resp
virtio_magma_buffer_get_handle_ctrl
virtio_magma_buffer_get_handle_resp
virtio_magma_buffer_get_info_ctrl
virtio_magma_buffer_get_info_resp
virtio_magma_buffer_set_cache_policy_ctrl
virtio_magma_buffer_set_cache_policy_resp
virtio_magma_buffer_set_name_ctrl
virtio_magma_buffer_set_name_resp
virtio_magma_config
virtio_magma_connection_add_performance_counter_buffer_offsets_to_pool_ctrl
virtio_magma_connection_add_performance_counter_buffer_offsets_to_pool_resp
virtio_magma_connection_clear_performance_counters_ctrl
virtio_magma_connection_clear_performance_counters_resp
virtio_magma_connection_create_buffer_ctrl
virtio_magma_connection_create_buffer_resp
virtio_magma_connection_create_context_ctrl
virtio_magma_connection_create_context_resp
virtio_magma_connection_create_performance_counter_buffer_pool_ctrl
virtio_magma_connection_create_performance_counter_buffer_pool_resp
virtio_magma_connection_create_semaphore_ctrl
virtio_magma_connection_create_semaphore_resp
virtio_magma_connection_dump_performance_counters_ctrl
virtio_magma_connection_dump_performance_counters_resp
virtio_magma_connection_enable_performance_counter_access_ctrl
virtio_magma_connection_enable_performance_counter_access_resp
virtio_magma_connection_enable_performance_counters_ctrl
virtio_magma_connection_enable_performance_counters_resp
virtio_magma_connection_execute_command_ctrl
virtio_magma_connection_execute_command_resp
virtio_magma_connection_execute_immediate_commands_ctrl
virtio_magma_connection_execute_immediate_commands_resp
virtio_magma_connection_execute_inline_commands_ctrl
virtio_magma_connection_execute_inline_commands_resp
virtio_magma_connection_flush_ctrl
virtio_magma_connection_flush_resp
virtio_magma_connection_get_error_ctrl
virtio_magma_connection_get_error_resp
virtio_magma_connection_get_notification_channel_handle_ctrl
virtio_magma_connection_get_notification_channel_handle_resp
virtio_magma_connection_import_buffer_ctrl
virtio_magma_connection_import_buffer_resp
virtio_magma_connection_import_semaphore2_ctrl
virtio_magma_connection_import_semaphore2_resp
virtio_magma_connection_map_buffer_ctrl
virtio_magma_connection_map_buffer_resp
virtio_magma_connection_perform_buffer_op_ctrl
virtio_magma_connection_perform_buffer_op_resp
virtio_magma_connection_read_notification_channel_ctrl
virtio_magma_connection_read_notification_channel_resp
virtio_magma_connection_read_performance_counter_completion_ctrl
virtio_magma_connection_read_performance_counter_completion_resp
virtio_magma_connection_release_buffer_ctrl
virtio_magma_connection_release_buffer_resp
virtio_magma_connection_release_context_ctrl
virtio_magma_connection_release_context_resp
virtio_magma_connection_release_ctrl
virtio_magma_connection_release_performance_counter_buffer_pool_ctrl
virtio_magma_connection_release_performance_counter_buffer_pool_resp
virtio_magma_connection_release_resp
virtio_magma_connection_release_semaphore_ctrl
virtio_magma_connection_release_semaphore_resp
virtio_magma_connection_remove_performance_counter_buffer_from_pool_ctrl
virtio_magma_connection_remove_performance_counter_buffer_from_pool_resp
virtio_magma_connection_unmap_buffer_ctrl
virtio_magma_connection_unmap_buffer_resp
virtio_magma_ctrl_hdr
virtio_magma_device_create_connection_ctrl
virtio_magma_device_create_connection_resp
virtio_magma_device_import_ctrl
virtio_magma_device_import_resp
virtio_magma_device_query_ctrl
virtio_magma_device_query_resp
virtio_magma_device_release_ctrl
virtio_magma_device_release_resp
virtio_magma_initialize_logging_ctrl
virtio_magma_initialize_logging_resp
virtio_magma_initialize_tracing_ctrl
virtio_magma_initialize_tracing_resp
virtio_magma_internal_map_ctrl
virtio_magma_internal_map_resp
virtio_magma_internal_release_handle_ctrl
virtio_magma_internal_release_handle_resp
virtio_magma_internal_unmap_ctrl
virtio_magma_internal_unmap_resp
virtio_magma_poll_ctrl
virtio_magma_poll_resp
virtio_magma_semaphore_export_ctrl
virtio_magma_semaphore_export_resp
virtio_magma_semaphore_reset_ctrl
virtio_magma_semaphore_reset_resp
virtio_magma_semaphore_signal_ctrl
virtio_magma_semaphore_signal_resp
virtio_magma_virt_connection_create_image_ctrl
virtio_magma_virt_connection_create_image_resp
virtio_magma_virt_connection_get_image_info_ctrl
virtio_magma_virt_connection_get_image_info_resp
virtmagma_buffer_set_name_wrapper
virtmagma_command_descriptor
virtmagma_create_image_wrapper
virtmagma_get_image_info_wrapper
virtmagma_ioctl_args_handshake
virtmagma_ioctl_args_magma_command

Constants§

MAGMA_API_VERSION
MAGMA_CACHE_POLICY_CACHED
MAGMA_CACHE_POLICY_UNCACHED
MAGMA_CACHE_POLICY_WRITE_COMBINING
MAGMA_COHERENCY_DOMAIN_CPU
MAGMA_COHERENCY_DOMAIN_INACCESSIBLE
MAGMA_COHERENCY_DOMAIN_RAM
MAGMA_IMAGE_CREATE_FLAGS_PRESENTABLE
MAGMA_IMAGE_CREATE_FLAGS_VULKAN_USAGE
MAGMA_IMPORT_SEMAPHORE_ONE_SHOT
MAGMA_MAX_IMAGE_PLANES
MAGMA_POLL_CONDITION_SIGNALED
MAGMA_POLL_TYPE_HANDLE
MAGMA_POLL_TYPE_SEMAPHORE
MAGMA_QUERY_VENDOR_ID
MAGMA_STATUS_INTERNAL_ERROR
MAGMA_STATUS_INVALID_ARGS
MAGMA_STATUS_MEMORY_ERROR
MAGMA_STATUS_OK
MAGMA_STATUS_TIMED_OUT
MAGMA_VENDOR_ID_INTEL
MAGMA_VENDOR_ID_MALI
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_BUFFER_CLEAN_CACHE
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_BUFFER_EXPORT
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_BUFFER_GET_CACHE_POLICY
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_BUFFER_GET_HANDLE
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_BUFFER_GET_INFO
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_BUFFER_SET_CACHE_POLICY
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_BUFFER_SET_NAME
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_ADD_PERFORMANCE_COUNTER_BUFFER_OFFSETS_TO_POOL
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_CLEAR_PERFORMANCE_COUNTERS
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_CREATE_BUFFER
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_CREATE_CONTEXT
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_CREATE_PERFORMANCE_COUNTER_BUFFER_POOL
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_CREATE_SEMAPHORE
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_DUMP_PERFORMANCE_COUNTERS
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_ENABLE_PERFORMANCE_COUNTERS
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_ENABLE_PERFORMANCE_COUNTER_ACCESS
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_EXECUTE_COMMAND
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_EXECUTE_IMMEDIATE_COMMANDS
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_EXECUTE_INLINE_COMMANDS
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_FLUSH
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_GET_ERROR
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_GET_NOTIFICATION_CHANNEL_HANDLE
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_IMPORT_BUFFER
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_IMPORT_SEMAPHORE2
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_MAP_BUFFER
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_PERFORM_BUFFER_OP
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_READ_NOTIFICATION_CHANNEL
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_READ_PERFORMANCE_COUNTER_COMPLETION
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_RELEASE
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_RELEASE_BUFFER
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_RELEASE_CONTEXT
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_RELEASE_PERFORMANCE_COUNTER_BUFFER_POOL
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_RELEASE_SEMAPHORE
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_REMOVE_PERFORMANCE_COUNTER_BUFFER_FROM_POOL
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_CONNECTION_UNMAP_BUFFER
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_DEVICE_CREATE_CONNECTION
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_DEVICE_IMPORT
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_DEVICE_QUERY
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_DEVICE_RELEASE
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_INITIALIZE_LOGGING
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_INITIALIZE_TRACING
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_INTERNAL_MAP
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_INTERNAL_RELEASE_HANDLE
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_INTERNAL_UNMAP
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_POLL
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_SEMAPHORE_EXPORT
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_SEMAPHORE_RESET
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_SEMAPHORE_SIGNAL
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_VIRT_CONNECTION_CREATE_IMAGE
virtio_magma_ctrl_type_VIRTIO_MAGMA_CMD_VIRT_CONNECTION_GET_IMAGE_INFO
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_BUFFER_CLEAN_CACHE
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_BUFFER_EXPORT
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_BUFFER_GET_CACHE_POLICY
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_BUFFER_GET_HANDLE
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_BUFFER_GET_INFO
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_BUFFER_SET_CACHE_POLICY
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_BUFFER_SET_NAME
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_ADD_PERFORMANCE_COUNTER_BUFFER_OFFSETS_TO_POOL
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_CLEAR_PERFORMANCE_COUNTERS
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_CREATE_BUFFER
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_CREATE_CONTEXT
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_CREATE_PERFORMANCE_COUNTER_BUFFER_POOL
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_CREATE_SEMAPHORE
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_DUMP_PERFORMANCE_COUNTERS
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_ENABLE_PERFORMANCE_COUNTERS
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_ENABLE_PERFORMANCE_COUNTER_ACCESS
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_EXECUTE_COMMAND
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_EXECUTE_IMMEDIATE_COMMANDS
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_EXECUTE_INLINE_COMMANDS
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_FLUSH
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_GET_ERROR
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_GET_NOTIFICATION_CHANNEL_HANDLE
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_IMPORT_BUFFER
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_IMPORT_SEMAPHORE2
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_MAP_BUFFER
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_PERFORM_BUFFER_OP
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_READ_NOTIFICATION_CHANNEL
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_READ_PERFORMANCE_COUNTER_COMPLETION
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_RELEASE
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_RELEASE_BUFFER
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_RELEASE_CONTEXT
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_RELEASE_PERFORMANCE_COUNTER_BUFFER_POOL
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_RELEASE_SEMAPHORE
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_REMOVE_PERFORMANCE_COUNTER_BUFFER_FROM_POOL
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_CONNECTION_UNMAP_BUFFER
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_DEVICE_CREATE_CONNECTION
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_DEVICE_IMPORT
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_DEVICE_QUERY
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_DEVICE_RELEASE
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_ERR_HOST_DISCONNECTED
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_ERR_INTERNAL
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_ERR_INVALID_ARGUMENT
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_ERR_INVALID_COMMAND
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_ERR_OUT_OF_MEMORY
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_ERR_UNIMPLEMENTED
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_INITIALIZE_LOGGING
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_INITIALIZE_TRACING
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_INTERNAL_MAP
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_INTERNAL_RELEASE_HANDLE
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_INTERNAL_UNMAP
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_POLL
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_SEMAPHORE_EXPORT
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_SEMAPHORE_RESET
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_SEMAPHORE_SIGNAL
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_VIRT_CONNECTION_CREATE_IMAGE
virtio_magma_ctrl_type_VIRTIO_MAGMA_RESP_VIRT_CONNECTION_GET_IMAGE_INFO

Functions§

magma_buffer_clean_cache
\brief Cleans, and optionally invalidates, the cache for the region of memory specified by the given buffer, offset, and size, and write the contents to ram. \param buffer A valid buffer. \param offset An offset into the buffer. Must be less than or equal to the buffer’s size. \param size Size of region to be cleaned. Offset + size must be less than or equal to the buffer’s size. \param operation One of MAGMA_CACHE_OPERATION_CLEAN or MAGMA_CACHE_OPERATION_CLEAN_INVALIDATE.
magma_buffer_export
\brief Exports the given buffer, returning a handle that may be imported into a connection. \param buffer A valid buffer. \param buffer_handle_out The returned handle.
magma_buffer_get_cache_policy
\brief Queries the cache policy for a buffer. \param buffer A valid buffer. \param cache_policy_out The returned cache policy.
magma_buffer_get_handle
\brief Gets a platform handle for the given buffer. This can be used to perform a CPU mapping of the buffer using the standard syscall. The handle may be released without invalidating such CPU mappings. \param buffer A valid buffer. \param handle_out Pointer to the returned handle.
magma_buffer_get_info
\brief Get information on a magma buffer \param buffer A valid buffer. \param info_out Pointer to struct that receives the buffer info.
magma_buffer_set_cache_policy
\brief Configures the cache for the given buffer. \param buffer A valid buffer. \param policy One of MAGMA_CACHE_POLICY_[CACHED|WRITE_COMBINING|UNCACHED].
magma_buffer_set_name
\brief Sets a name for the buffer for use in debugging tools. \param buffer A valid buffer. \param name The 0-terminated name of the buffer. May be truncated.
magma_connection_add_performance_counter_buffer_offsets_to_pool
\brief Adds a an array of buffers + offset to the pool. |offsets[n].buffer_id| is the koid of a buffer that was previously imported using ImportBuffer(). The same buffer may be added to multiple pools. The pool will hold on to a reference to the buffer even after ReleaseBuffer is called. When dumped into this entry, counters will be written starting at |offsets[n].offset| bytes into the buffer, and up to |offsets[n].offset| + |offsets[n].size|. |offsets[n].size| must be large enough to fit all enabled counters. Performance counter access must have been enabled using magma_connection_enable_performance_counter_access before calling this method. \param connection An open connection to a device. \param pool_id An existing pool. \param offsets An array of offsets to add. \param offsets_count The number of elements in offsets.
magma_connection_clear_performance_counters
\brief Sets the values of all listed performance counters to 0. May not be supported by some hardware. Performance counter access must have been enabled using magma_connection_enable_performance_counter_access before calling this method. \param connection An open connection to a device. \param counters An implementation-defined list of counters. \param counters_count The number of entries in |counters|.
magma_connection_create_buffer
\brief Creates a memory buffer of at least the given size. \param connection An open connection. \param size Requested buffer size. \param size_out The returned buffer’s actual size. \param buffer_out The returned buffer. \param id_out The buffer id of the buffer.
magma_connection_create_context
\brief Creates a context on the given connection. \param connection An open connection. \param context_id_out The returned context id.
magma_connection_create_performance_counter_buffer_pool
\brief Create a pool of buffers that performance counters can be dumped into. Performance counter access must have been enabled using magma_connection_enable_performance_counter_access before calling this method. \param connection An open connection to a device. \param pool_id_out A new pool id. Must not currently be in use. \param notification_handle_out A handle that should be waited on.
magma_connection_create_semaphore
\brief Creates a semaphore. \param connection An open connection. \param semaphore_out The returned semaphore. \param id_out The id of the semaphore.
magma_connection_dump_performance_counters
\brief Triggers dumping of the performance counters into a buffer pool. May fail silently if there are no buffers in the pool. |trigger_id| is an arbitrary ID assigned by the client that can be returned in OnPerformanceCounterReadCompleted. Performance counter access must have been enabled using magma_connection_enable_performance_counter_access before calling this method. \param connection An open connection to a device. \param pool_id An existing pool \param trigger_id An arbitrary ID assigned by the client that will be returned in OnPerformanceCounterReadCompleted.
magma_connection_enable_performance_counter_access
\brief Tries to enable access to performance counters. Returns MAGMA_STATUS_OK if counters were successfully enabled or MAGMA_STATUS_ACCESS_DENIED if channel is for the wrong device and counters were not successfully enabled previously. \param connection An open connection to a device. \param channel A handle to a channel to a gpu-performance-counter device.
magma_connection_enable_performance_counters
\brief Enables a set of performance counters (the precise definition depends on the driver). Disables enabled performance counters that are not in the new set. Performance counters will also be automatically disabled on connection close. Performance counter access must have been enabled using magma_connection_enable_performance_counter_access before calling this method. \param connection An open connection to a device. \param counters An implementation-defined list of counters. \param counters_count The number of entries in |counters|.
magma_connection_execute_command
\brief Submits command buffers for execution on the hardware. \param connection An open connection. \param context_id A valid context id. \param descriptor A pointer to the command descriptor.
magma_connection_execute_immediate_commands
\brief Submits a series of commands for execution on the hardware without using a command buffer. \param connection An open connection. \param context_id A valid context ID. \param command_count The number of commands in the provided buffer. \param command_buffers An array of command_count magma_inline_command_buffer structs.
magma_connection_execute_inline_commands
\brief Submits a series of commands for execution on the hardware without using a command buffer. \param connection An open connection. \param context_id A valid context ID. \param command_count The number of commands in the provided buffer. \param command_buffers An array of command_count magma_inline_command_buffer structs.
magma_connection_flush
\brief Incurs a round-trip to the system driver, used to ensure all previous messages have been observed, but not necessarily completed. If a system driver error occurs, the connection will be closed, and this interface will return the error. \param connection An open connection.
magma_connection_get_error
\brief If a system driver error occurs, the connection will be closed, and this interface will eventually return the error. This interface does not flush messages that may be pending (see magma_connection_flush). \param connection An open connection.
magma_connection_get_notification_channel_handle
\brief Returns a handle that can be waited on to determine when the connection has data in the notification channel. This channel has the same lifetime as the connection and must not be closed by the client. \param connection An open connection.
magma_connection_import_buffer
\brief Imports and takes ownership of the buffer referred to by the given handle. Takes ownership of |buffer_handle| on both success and failure. \param connection An open connection. \param buffer_handle A valid handle. \param size_out The size of the buffer in bytes. \param buffer_out The returned buffer. \param id_out The buffer id of the buffer.
magma_connection_import_semaphore2
\brief Imports and takes ownership of the semaphore referred to by the given handle. Takes ownership of |semaphore_handle| on both success and failure. \param connection An open connection. \param semaphore_handle A valid semaphore handle. \param flags Pass MAGMA_IMPORT_SEMAPHORE_ONESHOT to prevent auto-reset after wait. \param semaphore_out The returned semaphore. \param id_out The id of the semaphore.
magma_connection_map_buffer
\brief Maps a buffer range onto the hardware in the connection’s address space at the given address. Depending on the MSD this may automatically commit and populate that range. \param connection An open connection. \param hw_va Destination virtual address for the mapping. \param buffer A valid buffer. \param offset Offset into the buffer. \param length Length in bytes of the range to map. \param map_flags A valid MAGMA_MAP_FLAGS value.
magma_connection_perform_buffer_op
\brief Perform an operation on a range of a buffer \param connection An open connection. \param buffer A valid buffer. \param options Options for the operation. \param start_offset Byte offset into the buffer. \param length Length (in bytes) of the region to operate on.
magma_connection_read_notification_channel
\brief Reads a notification from the channel into the given buffer. Message sizes may vary depending on the MSD. If the buffer provided is too small for the message, MAGMA_STATUS_INVALID_ARGS will be returned and the size of message will be returned in the buffer_size_out parameter. \param connection An open connection. \param buffer Buffer into which to read notification data. \param buffer_size Size of the given buffer. \param buffer_size_out Returned size of the notification data written to the buffer, or 0 if there are no messages pending. \param more_data_out True if there is more notification data waiting.
magma_connection_read_performance_counter_completion
\brief Reads one performance counter completion event, if available. \param connection An open connection to a device. \param pool_id An existing pool. \param trigger_id_out The trigger ID for this event. \param buffer_id_out The buffer ID for this event. \param buffer_offset_out The buffer offset for this event. \param time_out The monotonic time this event happened. \param result_flags_out A set of flags giving more information about this event.
magma_connection_release
\brief Releases the given connection. \param connection An open connection.
magma_connection_release_buffer
\brief Releases the given memory buffer. \param connection An open connection. \param buffer A valid buffer.
magma_connection_release_context
\brief Releases the context associated with the given id. \param connection An open connection. \param context_id A valid context id.
magma_connection_release_performance_counter_buffer_pool
\brief Releases a pool of performance counter buffers. Performance counter access must have been enabled using magma_connection_enable_performance_counter_access before calling this method. \param connection An open connection to a device. \param pool_id An existing pool id.
magma_connection_release_semaphore
\brief Releases the given semaphore. \param connection An open connection. \param semaphore A valid semaphore.
magma_connection_remove_performance_counter_buffer_from_pool
\brief Removes every offset of a buffer from the pool. Performance counter access must have been enabled using magma_connection_enable_performance_counter_access before calling this method. \param connection An open connection to a device. \param pool_id An existing pool. \param buffer A magma_buffer
magma_connection_unmap_buffer
\brief Releases the mapping at the given hardware address. \param connection An open connection. \param hw_va A hardware virtual address associated with an existing mapping of the given buffer. \param buffer A valid buffer.
magma_device_create_connection
\brief Opens a connection to a device. \param device An open device \param connection_out Returned connection.
magma_device_import
\brief Imports and takes ownership of a channel to a device. Takes ownership of |device_channel| on both success and failure. \param device_channel A channel connecting to a gpu class device. \param device_out Returned device.
magma_device_query
\brief Performs a query synchronously. On MAGMA_STATUS_OK, a given query |id| will return either a buffer in |result_buffer_out|, or a value in |result_out|. A NULL pointer may be provided for whichever result parameter is not needed. \param device An open device. \param id A vendor-specific ID. \param result_buffer_out Handle to the returned buffer. \param result_out Pointer to a uint64 result.
magma_device_release
\brief Releases a handle to a device \param device An open device.
magma_initialize_logging
\brief Initializes logging, used for debug and some exceptional error reporting. This should be called on Fuchsia; on other platforms it’s not needed and will just close the given handle. \param channel An open connection to the syslog service.
magma_initialize_tracing
\brief Initializes tracing. This should be called on Fuchsia; on other platforms it’s not needed and will just close the given handle. \param channel An open connection to a tracing provider.
magma_poll
\brief Waits for at least one of the given items to meet a condition. Does not reset any semaphores. When MAGMA_STATUS_OK is returned, results are returned in the items array. MAGMA_STATUS_TIMED_OUT is returned if no conditions are met before the given timeout expires. If the notification channel handle is included in the item list, and the magma connection is closed, then MAGMA_STATUS_CONNECTION_LOST is returned. \param items Array of poll items. Type should be either MAGMA_POLL_TYPE_SEMAPHORE or MAGMA_POLL_TYPE_HANDLE. Condition may be set to MAGMA_POLL_CONDITION_SIGNALED OR MAGMA_POLL_CONDITION_READABLE. If condition is 0 the item is ignored. Item results are set to the condition that was satisfied, otherwise 0. If the same item is given twice the behavior is undefined. \param count Number of poll items in the array. \param timeout_ns Time in ns to wait before returning MAGMA_STATUS_TIMED_OUT.
magma_semaphore_export
\brief Exports the given semaphore, returning a handle that may be imported into a connection \param semaphore A valid semaphore. \param semaphore_handle_out The returned handle.
magma_semaphore_reset
\brief Resets the given semaphore. \param semaphore A valid semaphore.
magma_semaphore_signal
\brief Signals the given semaphore. \param semaphore A valid semaphore.
magma_virt_connection_create_image
\brief Creates an image buffer backed by a buffer collection given a DRM format and optional modifier, as specified in the create info. \param connection An open connection. \param create_info Input parameters describing the image. \param size_out The size of the image buffer in bytes \param image_out The image buffer. \param buffer_id_out The ID of the image buffer.
magma_virt_connection_get_image_info
\brief Returns parameters for an image created with virtmagma_create_image. \param connection An open connection. \param image The image buffer. \param image_info_out Output parameters describing the image.

Type Aliases§

__u32
__u64
magma_bool_t
magma_buffer_id_t
magma_buffer_info_t
magma_buffer_offset_t
magma_buffer_range_op_t
magma_buffer_t
magma_cache_operation_t
magma_cache_policy_t
magma_coherency_domain_t
magma_colorspace_t
magma_command_descriptor_t
magma_connection_t
magma_device_t
magma_exec_command_buffer_t
magma_exec_resource_t
magma_format_modifier_t
magma_format_t
magma_handle_t
magma_image_create_info_t
magma_image_info_t
magma_inline_command_buffer_t
magma_perf_count_pool_t
magma_poll_item_t
magma_query_t
magma_semaphore_id_t
magma_semaphore_t
magma_status_t
magma_sysmem_connection_t
magma_total_time_query_result_t
virtio_magma_buffer_clean_cache_ctrl_t
virtio_magma_buffer_clean_cache_resp_t
virtio_magma_buffer_export_ctrl_t
virtio_magma_buffer_export_resp_t
virtio_magma_buffer_get_cache_policy_ctrl_t
virtio_magma_buffer_get_cache_policy_resp_t
virtio_magma_buffer_get_handle_ctrl_t
virtio_magma_buffer_get_handle_resp_t
virtio_magma_buffer_get_info_ctrl_t
virtio_magma_buffer_get_info_resp_t
virtio_magma_buffer_set_cache_policy_ctrl_t
virtio_magma_buffer_set_cache_policy_resp_t
virtio_magma_buffer_set_name_ctrl_t
virtio_magma_buffer_set_name_resp_t
virtio_magma_config_t
virtio_magma_connection_add_performance_counter_buffer_offsets_to_pool_ctrl_t
virtio_magma_connection_add_performance_counter_buffer_offsets_to_pool_resp_t
virtio_magma_connection_clear_performance_counters_ctrl_t
virtio_magma_connection_clear_performance_counters_resp_t
virtio_magma_connection_create_buffer_ctrl_t
virtio_magma_connection_create_buffer_resp_t
virtio_magma_connection_create_context_ctrl_t
virtio_magma_connection_create_context_resp_t
virtio_magma_connection_create_performance_counter_buffer_pool_ctrl_t
virtio_magma_connection_create_performance_counter_buffer_pool_resp_t
virtio_magma_connection_create_semaphore_ctrl_t
virtio_magma_connection_create_semaphore_resp_t
virtio_magma_connection_dump_performance_counters_ctrl_t
virtio_magma_connection_dump_performance_counters_resp_t
virtio_magma_connection_enable_performance_counter_access_ctrl_t
virtio_magma_connection_enable_performance_counter_access_resp_t
virtio_magma_connection_enable_performance_counters_ctrl_t
virtio_magma_connection_enable_performance_counters_resp_t
virtio_magma_connection_execute_command_ctrl_t
virtio_magma_connection_execute_command_resp_t
virtio_magma_connection_execute_immediate_commands_ctrl_t
virtio_magma_connection_execute_immediate_commands_resp_t
virtio_magma_connection_execute_inline_commands_ctrl_t
virtio_magma_connection_execute_inline_commands_resp_t
virtio_magma_connection_flush_ctrl_t
virtio_magma_connection_flush_resp_t
virtio_magma_connection_get_error_ctrl_t
virtio_magma_connection_get_error_resp_t
virtio_magma_connection_get_notification_channel_handle_ctrl_t
virtio_magma_connection_get_notification_channel_handle_resp_t
virtio_magma_connection_import_buffer_ctrl_t
virtio_magma_connection_import_buffer_resp_t
virtio_magma_connection_import_semaphore2_ctrl_t
virtio_magma_connection_import_semaphore2_resp_t
virtio_magma_connection_map_buffer_ctrl_t
virtio_magma_connection_map_buffer_resp_t
virtio_magma_connection_perform_buffer_op_ctrl_t
virtio_magma_connection_perform_buffer_op_resp_t
virtio_magma_connection_read_notification_channel_ctrl_t
virtio_magma_connection_read_notification_channel_resp_t
virtio_magma_connection_read_performance_counter_completion_ctrl_t
virtio_magma_connection_read_performance_counter_completion_resp_t
virtio_magma_connection_release_buffer_ctrl_t
virtio_magma_connection_release_buffer_resp_t
virtio_magma_connection_release_context_ctrl_t
virtio_magma_connection_release_context_resp_t
virtio_magma_connection_release_ctrl_t
virtio_magma_connection_release_performance_counter_buffer_pool_ctrl_t
virtio_magma_connection_release_performance_counter_buffer_pool_resp_t
virtio_magma_connection_release_resp_t
virtio_magma_connection_release_semaphore_ctrl_t
virtio_magma_connection_release_semaphore_resp_t
virtio_magma_connection_remove_performance_counter_buffer_from_pool_ctrl_t
virtio_magma_connection_remove_performance_counter_buffer_from_pool_resp_t
virtio_magma_connection_unmap_buffer_ctrl_t
virtio_magma_connection_unmap_buffer_resp_t
virtio_magma_ctrl_hdr_t
virtio_magma_ctrl_type
virtio_magma_device_create_connection_ctrl_t
virtio_magma_device_create_connection_resp_t
virtio_magma_device_import_ctrl_t
virtio_magma_device_import_resp_t
virtio_magma_device_query_ctrl_t
virtio_magma_device_query_resp_t
virtio_magma_device_release_ctrl_t
virtio_magma_device_release_resp_t
virtio_magma_initialize_logging_ctrl_t
virtio_magma_initialize_logging_resp_t
virtio_magma_initialize_tracing_ctrl_t
virtio_magma_initialize_tracing_resp_t
virtio_magma_internal_map_ctrl_t
virtio_magma_internal_map_resp_t
virtio_magma_internal_release_handle_ctrl_t
virtio_magma_internal_release_handle_resp_t
virtio_magma_internal_unmap_ctrl_t
virtio_magma_internal_unmap_resp_t
virtio_magma_poll_ctrl_t
virtio_magma_poll_resp_t
virtio_magma_semaphore_export_ctrl_t
virtio_magma_semaphore_export_resp_t
virtio_magma_semaphore_reset_ctrl_t
virtio_magma_semaphore_reset_resp_t
virtio_magma_semaphore_signal_ctrl_t
virtio_magma_semaphore_signal_resp_t
virtio_magma_virt_connection_create_image_ctrl_t
virtio_magma_virt_connection_create_image_resp_t
virtio_magma_virt_connection_get_image_info_ctrl_t
virtio_magma_virt_connection_get_image_info_resp_t

Unions§

magma_poll_item__bindgen_ty_1