Go to the documentation of this file.
50 #ifndef HAL_GFX_HAL_H__
51 #define HAL_GFX_HAL_H__
64 #define MUTEX_MALLOC 1
int32_t hal_gfx_sys_init(void)
Initialize system.
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.
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.
hal_gfx_buffer_t bo
Memory base structure.
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.
int fd
File Descriptor of buffer.
void hal_gfx_buffer_destroy(hal_gfx_buffer_t *bo)
Destroy/deallocate buffer.
int last_submission_id
Latest command list id.
uint32_t hal_gfx_reg_read(uint32_t reg)
Read Hardware register.
void * base_virt
Virtual address of buffer.
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.
int offset
Record ringbuffer usage.
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()
uintptr_t base_phys
Physical address of buffer.