VGEM

VGEM — VGEM support library

Functions

void vgem_create ()
void * vgem_mmap ()
bool vgem_has_fences ()
bool vgem_fence_has_flag ()
uint32_t vgem_fence_attach ()
void vgem_fence_signal ()

Types and Values

Includes

#include <igt.h>

Description

This library provides various auxiliary helper functions for writing VGEM tests. VGEM is especially useful as a virtual dma-buf import and exporter and for testing cross driver synchronization (either using epxlicit dma-fences or using implicit fences attached to dma-bufs).

Functions

vgem_create ()

void
vgem_create (int fd,
             struct vgem_bo *bo);

vgem_mmap ()

void *
vgem_mmap (int fd,
           struct vgem_bo *bo,
           unsigned  prot);

vgem_has_fences ()

bool
vgem_has_fences (int fd);

vgem_fence_has_flag ()

bool
vgem_fence_has_flag (int fd,
                     unsigned  flags);

vgem_fence_attach ()

uint32_t
vgem_fence_attach (int fd,
                   struct vgem_bo *bo,
                   unsigned  flags);

vgem_fence_signal ()

void
vgem_fence_signal (int fd,
                   uint32_t fence);

Types and Values

struct vgem_bo

struct vgem_bo {
	uint32_t handle;
	uint32_t width, height;
	uint32_t bpp, pitch;
	uint64_t size;
};

WIP_VGEM_FENCE_NOTIMEOUT

#define WIP_VGEM_FENCE_NOTIMEOUT 0x2