dma-buf
Header: kmsroots/dma-buf.h
Table of contents (click to go)
Macros
Enums
Unions
Structs
Functions
Function Pointers
API Documentation
Similar comments may be found in wlroots dmabuf.h as this API endpoint is largely just a copy of what’s in wlroots.
kmr_dma_buf_sync_flags
-
enum kmr_dma_buf_sync_flags
-
KMR_DMA_BUF_SYNC_READ- Value set to
1 KMR_DMA_BUF_SYNC_WRITE- Value set to
2 KMR_DMA_BUF_SYNC_RW- Value set to
3
kmr_dma_buf_import_sync_file_create_info
-
struct kmr_dma_buf_import_sync_file_create_info
-
uint8_t dmaBufferFdsCount;
-
int *dmaBufferFds;
-
int syncFileFd;
-
kmr_dma_buf_sync_flags syncFlags;
dmaBufferFdsCount- Array size of
dmaBufferFds dmaBufferFds- Pointer to an array of file descriptors to DMA-BUF’s of size
dmaBufferFdsCount. syncFileFd- File descriptor to a graphics API synchronization primitive.May be acquired in Vulkan via (VkSemaphoreGetFdInfoKHR -> vkGetSemaphoreFdKHR) orby making a call to
kmr_vk_sync_obj_export_external_sync_fd(). Will be closed onsuccess or failure. syncFlags- Flags used to determine permission allowed after import
-
uint8_t dmaBufferFdsCount;
kmr_dma_buf_import_sync_file_create
-
int kmr_dma_buf_import_sync_file_create(struct kmr_dma_buf_import_sync_file_create_info *importSyncFileInfo);
Import a single file descriptor to a graphics API synchronization primitive into an array of DMA-BUF file descriptors with
drmIoctl(DMA_BUF_IOCTL_IMPORT_SYNC_FILE).- Parameters:
- importSyncFileInfoPointer to a
structkmr_dma_buf_import_sync_file_create_info - Returns:
- on success: 0on failure: -1
kmr_dma_buf_export_sync_file
-
struct kmr_dma_buf_export_sync_file
-
syncFileFdsCount- Array size of
syncFileFds syncFileFds- Pointer to an array of file descriptors used for synchronizationof size
syncFileFdsCount. These file descriptors maybe imported to a graphics API primitive. In Vulkan you can import viaor by making a call tokmr_vk_sync_obj_import_external_sync_fd()
kmr_dma_buf_export_sync_file_create_info
-
struct kmr_dma_buf_export_sync_file_create_info
-
uint8_t dmaBufferFdsCount;
-
int *dmaBufferFds;
-
kmr_dma_buf_sync_flags syncFlags;
dmaBufferFdsCount- Array size of
dmaBufferFds dmaBufferFds- Pointer to an array of file descriptors. These file descriptors point toDMA-BUF’s of size
dmaBufferFdsCount. syncFlags- Flags used to determine permission allowed by file descriptor after export
-
uint8_t dmaBufferFdsCount;
kmr_dma_buf_export_sync_file_create
-
struct kmr_dma_buf_export_sync_file *kmr_dma_buf_export_sync_file_create(struct kmr_dma_buf_export_sync_file_create_info *exportSyncFileInfo);
Exports an array of synchronization file descriptors from an array of DMA-BUF file descriptors with
drmIoctl(DMA_BUF_IOCTL_EXPORT_SYNC_FILE).- Parameters:
- exportSyncFileInfoPointer to a
structkmr_dma_buf_export_sync_file_create_info - Returns:
- on success: Pointer to a
structkmr_dma_buf_export_sync_fileon failure: NULL
kmr_dma_buf_export_sync_file_destroy
-
void kmr_dma_buf_export_sync_file_destroy(struct kmr_dma_buf_export_sync_file *exportSyncFile);
Frees any allocated memory and closes FD’s (if open) created after
kmr_dma_buf_export_sync_file_create()call.- Parameters:
- exportSyncFilePointer to a valid
structkmr_dma_buf_export_sync_file/* Free'd members with fd's closed */ struct kmr_dma_buf_export_sync_file { int *syncFileFds; }