ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_drw_dlist_t Struct Reference

Builder state for composing a DRW display list in a caller buffer. More...

#include <ra8_drw.h>

Data Fields

uint32_t * buf
 Caller word buffer, 4-byte aligned, in SRAM.
uint32_t cap_words
 Buffer capacity in 32-bit words.
uint32_t count
 Words emitted so far (<= cap_words).
bool overflow
 A request exceeded the buffer capacity.
bool terminated
 ra8_drw_dlist_end has closed the list.

Detailed Description

Builder state for composing a DRW display list in a caller buffer.

A display list lets the DRW clear and repaint a framebuffer end to end with the CPU never touching it inside the loop, so there is no CPU/engine write race to latch STATUS.BUSERRMFB – the loop-stable path proven on silicon for issue #247. ra8_drw_dlist_begin binds this builder to a 4-byte-aligned word buffer in a region the DRW bus initiator can read (SRAM); ra8_drw_dlist_add_fill appends primitives; ra8_drw_dlist_end terminates the list; ra8_drw_dlist_run kicks it. The build calls never touch MMIO.

Invariant
count <= cap_words at all times; overflow latches true if a request would have exceeded cap_words and no partial entry is written.
static uint32_t s_dlist[32];
ra8_drw_dlist_begin(&dl, s_dlist, 32U);
ra8_drw_dlist_add_fill(&dl, &clear_rect);
ra8_drw_dlist_add_fill(&dl, &box_rect);
ra8_err_t ra8_drw_dlist_end(ra8_drw_dlist_t *dl)
Close a display list with its terminator word.
ra8_err_t ra8_drw_dlist_begin(ra8_drw_dlist_t *dl, uint32_t *buf, uint32_t cap_words)
Bind a display-list builder to a caller-owned word buffer.
ra8_err_t ra8_drw_dlist_add_fill(ra8_drw_dlist_t *dl, const ra8_drw_rect_t *rect)
Append one solid-rectangle fill primitive to a display list.
ra8_err_t ra8_drw_dlist_run(const ra8_drw_dlist_t *dl)
Trigger a built display list (writes DLISTSTART).
Builder state for composing a DRW display list in a caller buffer.
Definition ra8_drw.h:238
See also
ra8_drw_dlist_begin
ra8_drw_dlist_add_fill

Definition at line 238 of file ra8_drw.h.

Field Documentation

◆ buf

uint32_t* ra8_drw_dlist_t::buf

Caller word buffer, 4-byte aligned, in SRAM.

Definition at line 239 of file ra8_drw.h.

Referenced by internal_dlist_put_reg(), internal_dlist_put_special(), ra8_drw_dlist_begin(), and ra8_drw_dlist_run().

◆ cap_words

uint32_t ra8_drw_dlist_t::cap_words

Buffer capacity in 32-bit words.

Definition at line 240 of file ra8_drw.h.

Referenced by ra8_drw_dlist_add_fill(), ra8_drw_dlist_begin(), and ra8_drw_dlist_end().

◆ count

uint32_t ra8_drw_dlist_t::count

Words emitted so far (<= cap_words).

Definition at line 241 of file ra8_drw.h.

Referenced by internal_dlist_put_reg(), internal_dlist_put_special(), ra8_drw_dlist_add_fill(), ra8_drw_dlist_begin(), ra8_drw_dlist_end(), and ra8_drw_dlist_run().

◆ overflow

bool ra8_drw_dlist_t::overflow

A request exceeded the buffer capacity.

Definition at line 242 of file ra8_drw.h.

Referenced by ra8_drw_dlist_add_fill(), ra8_drw_dlist_begin(), ra8_drw_dlist_end(), and ra8_drw_dlist_run().

◆ terminated

bool ra8_drw_dlist_t::terminated

ra8_drw_dlist_end has closed the list.

Definition at line 243 of file ra8_drw.h.

Referenced by ra8_drw_dlist_begin(), ra8_drw_dlist_end(), and ra8_drw_dlist_run().


The documentation for this struct was generated from the following file: