hal_gfx_hal.h File Reference
#include "hal_gfx_sys_defs.h"

Go to the source code of this file.

Classes

struct  hal_gfx_buffer_t_
 The base structure of gpu memory. More...
 
struct  hal_gfx_ringbuffer_t_
 The ringbuffer structure. More...
 

Macros

#define MUTEX_RB   0
 
#define MUTEX_MALLOC   1
 
#define MUTEX_FLUSH   2
 
#define MUTEX_MAX   2
 

Typedefs

typedef struct hal_gfx_buffer_t_ hal_gfx_buffer_t
 The base structure of gpu memory. More...
 
typedef struct hal_gfx_ringbuffer_t_ hal_gfx_ringbuffer_t
 The ringbuffer structure. More...
 

Functions

int32_t hal_gfx_sys_init (void)
 Initialize system. Implementor defined. Called in hal_gfx_init() More...
 
int hal_gfx_wait_irq (void)
 Wait for interrupt from the GPU. More...
 
int hal_gfx_wait_irq_cl (int cl_id)
 Wait for a Command List to finish. More...
 
int hal_gfx_wait_irq_brk (int brk_id)
 Wait for a Breakpoint. More...
 
uint32_t hal_gfx_reg_read (uint32_t reg)
 Read Hardware register. More...
 
void hal_gfx_reg_write (uint32_t reg, uint32_t value)
 Write Hardware Register. More...
 
hal_gfx_buffer_t hal_gfx_buffer_create (int size)
 Create memory buffer. More...
 
hal_gfx_buffer_t hal_gfx_buffer_create_pool (int pool, int size)
 Create memory buffer at a specific pool. More...
 
void * hal_gfx_buffer_map (hal_gfx_buffer_t *bo)
 Maps buffer. More...
 
void hal_gfx_buffer_unmap (hal_gfx_buffer_t *bo)
 Unmaps buffer. More...
 
void hal_gfx_buffer_destroy (hal_gfx_buffer_t *bo)
 Destroy/deallocate buffer. More...
 
uintptr_t hal_gfx_buffer_phys (hal_gfx_buffer_t *bo)
 Get physical (GPU) base address of a given buffer. More...
 
void hal_gfx_buffer_flush (hal_gfx_buffer_t *bo)
 Write-back buffer from cache to main memory. More...
 
void * hal_gfx_host_malloc (size_t size)
 Allocate memory for CPU to use (typically, standard malloc() is called) More...
 
void hal_gfx_host_free (void *ptr)
 Free memory previously allocated with hal_gfx_host_malloc() More...
 
int hal_gfx_rb_init (hal_gfx_ringbuffer_t *rb, int reset)
 Initialize Ring Buffer. Should be called from inside hal_gfx_sys_init(). This is a private function, the user should never call it. More...
 
int hal_gfx_mutex_lock (int mutex_id)
 Mutex Lock for multiple processes/threads. More...
 
int hal_gfx_mutex_unlock (int mutex_id)
 Mutex Unlock for multiple processes/threads. More...