Go to the documentation of this file.
11 #ifndef HAL_GFX_HAL_H__
12 #define HAL_GFX_HAL_H__
25 #define MUTEX_MALLOC 1
int32_t hal_gfx_sys_init(void)
Initialize system. Implementor defined. Called in hal_gfx_init()
void hal_gfx_reg_write(uint32_t reg, uint32_t value)
Write Hardware Register.
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,...
int hal_gfx_wait_irq_brk(int brk_id)
Wait for a Breakpoint.
The ringbuffer structure.
void * hal_gfx_buffer_map(hal_gfx_buffer_t *bo)
Maps buffer.
int hal_gfx_wait_irq_cl(int cl_id)
Wait for a Command List to finish.
int hal_gfx_mutex_unlock(int mutex_id)
Mutex Unlock for multiple processes/threads.
hal_gfx_buffer_t hal_gfx_buffer_create_pool(int pool, int size)
Create memory buffer at a specific pool.
hal_gfx_buffer_t hal_gfx_buffer_create(int size)
Create memory buffer.
The base structure of gpu memory.
struct hal_gfx_ringbuffer_t_ hal_gfx_ringbuffer_t
The ringbuffer structure.
void * hal_gfx_host_malloc(size_t size)
Allocate memory for CPU to use (typically, standard malloc() is called)
int hal_gfx_wait_irq(void)
Wait for interrupt from the GPU.
void hal_gfx_buffer_destroy(hal_gfx_buffer_t *bo)
Destroy/deallocate buffer.
uint32_t hal_gfx_reg_read(uint32_t reg)
Read Hardware register.
int hal_gfx_mutex_lock(int mutex_id)
Mutex Lock for multiple processes/threads.
void hal_gfx_buffer_flush(hal_gfx_buffer_t *bo)
Write-back buffer from cache to main memory.
uintptr_t hal_gfx_buffer_phys(hal_gfx_buffer_t *bo)
Get physical (GPU) base address of a given buffer.
void hal_gfx_buffer_unmap(hal_gfx_buffer_t *bo)
Unmaps buffer.
struct hal_gfx_buffer_t_ hal_gfx_buffer_t
The base structure of gpu memory.
void hal_gfx_host_free(void *ptr)
Free memory previously allocated with hal_gfx_host_malloc()