NemaGFX API
Data Structures | Functions
nema_cmdlist.h File Reference

Data Structures

struct  nema_cmdlist_t
 

Functions

nema_cmdlist_t nema_cl_create_prealloc (uint32_t *addr_virt, uint32_t size_bytes)
 Create a new Command List into a preallocated space. More...
 
nema_cmdlist_t nema_cl_create_sized (uint32_t size_bytes)
 Create a new, non expandable Command List of specific size. More...
 
nema_cmdlist_t nema_cl_create (void)
 Create a new expandable Command List. More...
 
void nema_cl_destroy (nema_cmdlist_t *cl)
 Destroy/Free a Command List. More...
 
void nema_cl_rewind (nema_cmdlist_t *cl)
 Reset position of next command to be written to the beginning. Doesn't clear the List's contents. More...
 
void nema_cl_bind (nema_cmdlist_t *cl)
 Define in which Command List each subsequent commands are going to be inserted. More...
 
void nema_cl_unbind (void)
 Unbind current bound Command List, if any. More...
 
void nema_cl_submit (nema_cmdlist_t *cl)
 Enqueue Command List to the Ring Buffer for execution. More...
 
void nema_cl_wait (nema_cmdlist_t *cl)
 Wait for Command List to finish. More...
 
int nema_cl_add_cmd (uint32_t reg, uint32_t data)
 Add a command to the bound Command List. More...
 
int nema_cl_add_multiple_cmds (int cmd_no, uint32_t *cmd)
 Add multiple commands to the bound Command List. More...
 
void nema_cl_branch (nema_cmdlist_t *cl)
 Branch from the bound Command List to a different one. Return is implied. More...
 
void nema_cl_jump (nema_cmdlist_t *cl)
 Jump from the bound Command List to a different one. No return is implied. More...
 
void nema_cl_return (void)
 Add an explicit return command to the bound Command List. More...
 

Function Documentation

◆ nema_cl_add_cmd()

int nema_cl_add_cmd ( uint32_t  reg,
uint32_t  data 
)

Add a command to the bound Command List.

Parameters
regHardware register to be written
dataData to be written
Returns
0 if no error has occurred

◆ nema_cl_add_multiple_cmds()

int nema_cl_add_multiple_cmds ( int  cmd_no,
uint32_t *  cmd 
)

Add multiple commands to the bound Command List.

Parameters
cmd_noNumbers of commands to add
cmdPointer to the commands to be added
Returns
0 if no error has occurred

◆ nema_cl_bind()

void nema_cl_bind ( nema_cmdlist_t cl)

Define in which Command List each subsequent commands are going to be inserted.

Parameters
clPointer to the Command List

◆ nema_cl_branch()

void nema_cl_branch ( nema_cmdlist_t cl)

Branch from the bound Command List to a different one. Return is implied.

Parameters
clPointer to the Command List to branch to

◆ nema_cl_create()

nema_cmdlist_t nema_cl_create ( void  )

Create a new expandable Command List.

Returns
The instance of the new Command List

◆ nema_cl_create_prealloc()

nema_cmdlist_t nema_cl_create_prealloc ( uint32_t *  addr_virt,
uint32_t  size_bytes 
)

Create a new Command List into a preallocated space.

Parameters
addr_virtCommand List's address (preallocated)
size_bytesCommand List's size in bytes
Returns
The instance of the new Command List

◆ nema_cl_create_sized()

nema_cmdlist_t nema_cl_create_sized ( uint32_t  size_bytes)

Create a new, non expandable Command List of specific size.

Parameters
size_bytesCommand List's size in bytes
Returns
The instance of the new Command List

◆ nema_cl_destroy()

void nema_cl_destroy ( nema_cmdlist_t cl)

Destroy/Free a Command List.

Parameters
clPointer to the Command List

◆ nema_cl_jump()

void nema_cl_jump ( nema_cmdlist_t cl)

Jump from the bound Command List to a different one. No return is implied.

Parameters
clPointer to the Command List to jump to

◆ nema_cl_return()

void nema_cl_return ( void  )

Add an explicit return command to the bound Command List.

◆ nema_cl_rewind()

void nema_cl_rewind ( nema_cmdlist_t cl)

Reset position of next command to be written to the beginning. Doesn't clear the List's contents.

Parameters
clPointer to the Command List

◆ nema_cl_submit()

void nema_cl_submit ( nema_cmdlist_t cl)

Enqueue Command List to the Ring Buffer for execution.

Parameters
clPointer to the Command List

◆ nema_cl_unbind()

void nema_cl_unbind ( void  )

Unbind current bound Command List, if any.

◆ nema_cl_wait()

void nema_cl_wait ( nema_cmdlist_t cl)

Wait for Command List to finish.

Parameters
clPointer to the Command List