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... | |
hal_gfx_buffer_t hal_gfx_buffer_create | ( | int | size | ) |
Create memory buffer.
[in] | size | Size of buffer in bytes |
hal_gfx_buffer_t hal_gfx_buffer_create_pool | ( | int | pool, |
int | size | ||
) |
Create memory buffer at a specific pool.
[in] | pool | ID of the desired memory pool |
[in] | size | of buffer in bytes |
void hal_gfx_buffer_destroy | ( | hal_gfx_buffer_t * | bo | ) |
Destroy/deallocate buffer.
[in] | bo | Pointer to buffer struct |
void hal_gfx_buffer_flush | ( | hal_gfx_buffer_t * | bo | ) |
Write-back buffer from cache to main memory.
[in] | bo | Pointer to buffer struct |
void* hal_gfx_buffer_map | ( | hal_gfx_buffer_t * | bo | ) |
Maps buffer.
[in] | bo | Pointer to buffer struct |
uintptr_t hal_gfx_buffer_phys | ( | hal_gfx_buffer_t * | bo | ) |
Get physical (GPU) base address of a given buffer.
[in] | bo | Pointer to buffer struct |
void hal_gfx_buffer_unmap | ( | hal_gfx_buffer_t * | bo | ) |
Unmaps buffer.
[in] | bo | Pointer to buffer struct |
void hal_gfx_host_free | ( | void * | ptr | ) |
Free memory previously allocated with hal_gfx_host_malloc()
[in] | ptr | Pointer to allocated memory (virtual) |
void* hal_gfx_host_malloc | ( | size_t | size | ) |
Allocate memory for CPU to use (typically, standard malloc() is called)
[in] | size | Size in bytes |
int hal_gfx_mutex_lock | ( | int | mutex_id | ) |
Mutex Lock for multiple processes/threads.
[in] | mutex_id | MUTEX_RB or MUTEX_MALLOC |
int hal_gfx_mutex_unlock | ( | int | mutex_id | ) |
Mutex Unlock for multiple processes/threads.
[in] | mutex_id | MUTEX_RB or MUTEX_MALLOC |
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.
[in] | rb | Pointer to hal_gfx_ring_buffer_t struct |
[in] | reset | Resets the Ring Buffer if non-zero |
uint32_t hal_gfx_reg_read | ( | uint32_t | reg | ) |
Read Hardware register.
[in] | reg | Register to read |
void hal_gfx_reg_write | ( | uint32_t | reg, |
uint32_t | value | ||
) |
Write Hardware Register.
[in] | reg | Register to write |
[in] | value | Value to be written |
int32_t hal_gfx_sys_init | ( | void | ) |
Initialize system. Implementor defined. Called in hal_gfx_init()
int hal_gfx_wait_irq | ( | void | ) |
Wait for interrupt from the GPU.
int hal_gfx_wait_irq_brk | ( | int | brk_id | ) |
Wait for a Breakpoint.
[in] | brk_id | Breakpoint ID |
int hal_gfx_wait_irq_cl | ( | int | cl_id | ) |
Wait for a Command List to finish.
[in] | cl_id | cl_id Command List ID |