Go to the documentation of this file.
51 #ifndef HAL_GFX_CMDLIST_H__
52 #define HAL_GFX_CMDLIST_H__
65 #define CL_NOP 0x010000U
66 #define CL_PUSH 0x020000U
67 #define CL_RETURN 0x040000U
68 #define CL_ABORT 0x080000U
69 #define CL_BATCH_SHIFT 12
70 #define CL_BATCH_LOOP 0x8000
71 #define SUBMISSION_ID_MASK 0xffffff
void hal_gfx_cl_unbind(void)
Unbind current bound Command List, if any.
void hal_gfx_cl_jump(hal_gfx_cmdlist_t *cl)
Jump from the bound Command List to a different one.
hal_gfx_cmdlist_t * hal_gfx_cl_get_bound(void)
Get bound Command List.
hal_gfx_buffer_t bo
Buffer of command list.
hal_gfx_cmdlist_t hal_gfx_cl_le_create(void)
Create a new expandable Command List with power management mode.
struct hal_gfx_cmdlist_t_ * next
Points to next command list.
void hal_gfx_cl_bind(hal_gfx_cmdlist_t *cl)
Define in which Command List each subsequent commands are going to be inserted.
void hal_gfx_cl_destroy(hal_gfx_cmdlist_t *cl)
Destroy/Free a Command List.
int hal_gfx_cl_wait(hal_gfx_cmdlist_t *cl)
Wait for Command List to finish.
uint32_t * hal_gfx_cl_get_space(int cmd_no)
Request free space from command list.
void hal_gfx_cl_add_cmd(uint32_t reg, uint32_t data)
Add a command to the bound Command List.
int32_t submission_id
Command list id.
int hal_gfx_cl_enough_space(int cmd_no)
Check if there is enough space or expansion can be performed for required commands.
The base structure of gpu memory.
void hal_gfx_cl_le_destroy(hal_gfx_cmdlist_t *cl)
Destroy/Free a Command List with power management mode.
void hal_gfx_cl_submit(hal_gfx_cmdlist_t *cl)
Enqueue Command List to the Ring Buffer for execution.
int offset
Points to the next address to write.
struct hal_gfx_cmdlist_t_ hal_gfx_cmdlist_t
Command list structure.
void hal_gfx_cl_return(void)
Add an explicit return command to the bound Command List.
int hal_gfx_cl_almost_full(hal_gfx_cmdlist_t *cl)
Returns positive number if the Command List is almost full, otherwise returns 0.
hal_gfx_cmdlist_t hal_gfx_cl_create(void)
Create a new expandable Command List.
void hal_gfx_cl_bind_circular(hal_gfx_cmdlist_t *cl)
Define in which Command List each subsequent commands are going to be inserted.
int hal_gfx_cl_add_multiple_cmds(int cmd_no, uint32_t *cmd)
Add multiple commands to the bound Command List.
struct hal_gfx_cmdlist_t_ * root
Points to the head of the list.
hal_gfx_cmdlist_t hal_gfx_cl_create_sized(int size_bytes)
Create a new, non expandable Command List of specific size.
int size
Number of entries in the command list.
void hal_gfx_cl_rewind(hal_gfx_cmdlist_t *cl)
Reset position of next command to be written to the beginning.
hal_gfx_cmdlist_t hal_gfx_cl_create_prealloc(hal_gfx_buffer_t *bo)
Create a new Command List into a preallocated space.
void hal_gfx_cl_submit_no_irq(hal_gfx_cmdlist_t *cl)
Push command to command list, but do not trigger interrupt.
void hal_gfx_cl_branch(hal_gfx_cmdlist_t *cl)
Branch from the bound Command List to a different one.
Header file containing functions prototypes of Graphics library.