command-structs)This document summarizes the exact layouts of the four TASK command payloads supported on the SpacemiT K3 (36.56.104.183), verified by the public OFFSET_CHECK/SIZE_CHECK assertions in pvr_rogue_fwif_client_check.h and pvr_rogue_fwif_client.h.
Each structure begins immediately after the struct rogue_fwif_ccb_cmd_header (40 bytes) in the cCCB ring.
struct rogue_fwif_cmd_geom (112 bytes) ([P])Verified in pvr_rogue_fwif_client_check.h:
| Offset (in payload) | Offset (from cCCB header) | Type / Field | Role on K3 Hardware (36.56.104.183) |
|---|---|---|---|
0x00 |
0x28 |
cmd_shared (struct rogue_fwif_cmd_geom_frag_shared, 16 B) |
cmn.frame_num and hwrt_data_fw_addr (fw_addr of struct rogue_fwif_hwrtdata) |
0x10 |
0x38 |
regs (struct rogue_fwif_geom_regs, 64 B) |
Block of VDM/TE/PPP/TPU register values precomputed by the driver (vdm_ctrl_stream_base → 0x0408/0x040C, tpu_border_colour_table → 0x17A0/0x17A4, ppp_ctrl → 0x0C88, te_psg → 0x0C28, view_idx → 0x4098) |
0x50 |
0x78 |
flags (u32) |
Bit 0 (FIRSTKICK): first kick of the HWRTData (zeroes TPC/RTC and resets PM/TE); Bit 1 (LASTKICK): last TA before 3D (enables 3D on completion); abort/RTA bits |
0x54 |
0x7C |
partial_render_geom_frag_fence (struct rogue_fwif_ufo) |
Synchronization control with PR |
0x60 |
0x88 |
dummy_rgnhdr_init_geom_regs |
Errata fields (BRN 44455 / 63027) |
0x68 |
0x90 |
brn61484_66333_live_rt |
Auxiliary RTA field |
112 bytes (SIZE_CHECK(struct rogue_fwif_cmd_geom, 112)).struct rogue_fwif_cmd_frag (480 bytes) ([P])| Offset (in payload) | Offset (from cCCB header) | Primary Field | Role on K3 Hardware (36.56.104.183) |
|---|---|---|---|
0x00 |
0x28 |
cmd_shared (struct rogue_fwif_cmd_geom_frag_shared, 16 B) |
cmn.frame_num and hwrt_data_fw_addr (fw_addr of struct rogue_fwif_hwrtdata) |
0x10 |
0x38 |
regs (struct rogue_fwif_frag_regs, 448 B) |
ISP, PBE (8 MRTs), ZLS, PDS, USC, and TPU registers: |
| — | — | usc_pixel_output_ctrl, usc_clear_register0..7 |
→ BCAST[0x4070..0x4090] |
| — | — | isp_bgobjdepth, isp_bgobjvals |
→ BCAST[0x0F80], BCAST[0x0F88] |
| — | — | isp_aa, isp_ctl, isp_mtile_size, isp_scissor_base, isp_dbias_base |
→ BCAST[0x0F30], BCAST[0x0F38], BCAST[0x0F18], BCAST[0x0FB0..0x0FBC] |
| — | — | isp_oclqry_base (u64) |
→ CR[0x0FC0/0x0FC4] (if GET_VIS_RESULTS flag is active) |
| — | — | isp_zlsctl, isp_zload_base, isp_zstore_base, isp_stencil_load_base, isp_stencil_store_base |
→ BCAST[0x0F48..0x0F6C] (with RTA stride added when current_rt > 0) |
| — | — | pbe_word[8][3] |
→ BCAST[0x1510..0x154C] (word 0) and BCAST[0x1550..0x158C] (word 1 with RTA adjustment) |
| — | — | tpu_border_colour_table (u64) |
→ BCAST[0x1790/0x1794] |
| — | — | pds_bgnd0_base, pds_bgnd1_base, pds_bgnd3_sizeinfo, pds_bgnd_reg_sizeinfo |
→ BCAST[0x06A0..0x06BC] |
| — | — | event_pixel_pds_info, event_pixel_pds_code, event_pixel_pds_data |
→ BCAST[0x0618], BCAST[0x0620], BCAST[0x0628] |
| — | — | frag_screen |
→ BCAST[0x3E40] (screen_pixel_max) |
0x1D0 (464) |
0x1F8 |
flags (u32) |
DISABLE_PIXELMERGE, GET_VIS_RESULTS, FORCE_DEPTH_BUFFER, FORCE_STENCIL_BUFFER, ABORT |
0x1D4 (468) |
0x1FC |
zls_stride (u32) |
Z/Depth stride for slice offset calculation in RTA |
0x1D8 (472) |
0x200 |
sls_stride (u32) |
Stencil stride for slice offset calculation in RTA |
0x1DC (476) |
0x204 |
execute_count (u32) |
Execution count |
480 bytes (SIZE_CHECK(struct rogue_fwif_cmd_frag, 480)).36.56.104.183): The PIPE_ENABLE field inside regs.isp_ctl (bits [15:12]) defines how many ISP pipes to activate. On the K3 there are 6 physical pipes (NUM_ISP_IPP_PIPES = 6), so the firmware programs BCAST[0x0FD8] = min(((isp_ctl >> 12) & 0xF) + 1, 6).struct rogue_fwif_cmd_compute (96 bytes) ([P])Offsets verified in pvr_rogue_fwif_client_check.h: common at 0x00, regs at 0x08, flags at 0x50 (80), num_temp_regions at 0x54 (84), stream_start_offset at 0x58 (88), execute_count at 0x5C (92), total 96 bytes.
| Primary Field | Type | Role on K3 Hardware (36.56.104.183) |
|---|---|---|
common.frame_num |
u32 |
Frame number |
regs.tpu_border_colour_table |
u64 |
→ BCAST[0x17A8/0x17AC] |
regs.cdm_ctrl_stream_base |
u64 |
→ BCAST[0x0480/0x0484] |
regs.cdm_context_state_base_addr |
u64 |
→ BCAST[0x0498/0x049C] (compute CSW buffer) |
regs.tpu_tag_cdm_ctrl |
u32 |
→ BCAST[0x1858] (mandatory on K3, since TPU_DM_GLOBAL_REGISTERS is present!) |
regs.cdm_item / pds (in cdm_registers_cswitch) |
u64 |
→ BCAST[0x04A8/0x04AC] (ping-pong A/B), 0x04B0, 0x04B8/0x04BC, 0x04C0, and 0x04D8..0x04E0 on CSW resume |
flags, num_temp_regions, stream_start_offset, execute_count |
u32 |
Compute metadata and flags (includes CSW / prevent overlap flag) |
struct rogue_fwif_cmd_transfer (192 bytes) ([P])Offsets verified in pvr_rogue_fwif_client_check.h: common at 0x00, regs at 0x08, flags at 0xB8 (184), total 192 bytes. On the K3 there is neither TLA nor TDM; all accelerated surface transfers (blits, texture copies, readbacks) use ROGUE_FWIF_CCB_CMD_TYPE_TQ_3D on DM3:
| Primary Field | Type | Role on K3 Hardware (36.56.104.183) |
|---|---|---|
cmn.frame_num |
u32 |
Frame number |
regs.isp_bgobjvals |
u32 |
→ BCAST[0x0F88] |
regs.pds_bgnd0_base, pds_bgnd1_base, pds_bgnd3_sizeinfo, pds_bgnd_reg_sizeinfo |
u64/u32 |
→ BCAST[0x06A0..0x06BC] |
regs.usc_pixel_output_ctrl, usc_clear_register0..3 |
u32 |
→ BCAST[0x4070..0x4090] |
regs.frag_screen |
u32 |
→ BCAST[0x3E40] |
regs.isp_mtile_size, isp_aa, isp_ctl, isp_render |
u32 |
→ BCAST[0x0F18], 0x0F30, 0x0F38, 0x0F08 (includes 0x0FD8 = min(pipes, 6)) |
regs.event_pixel_pds_code, event_pixel_pds_data, event_pixel_pds_info |
u32 |
→ BCAST[0x0618], 0x0620, 0x0628 |
regs.pbe_wordx_mrty[3 * 3] |
u64 |
Up to 3 MRTs → BCAST[0x1510..0x1524] and BCAST[0x1550..0x1564] |
regs.isp_rgn / fast-mode regs |
u64/u32 |
When (isp_render & 3) == 2: programs 0x0F20/0x0F24, 0x0F28, 0x0FCC, 0x0FC8 |
flags |
u32 |
Transfer flags |
Validation note: Always verify the exact offsets against the open header
pvr_rogue_fwif_client_check.hwhen building the clean-room reimplementation (viastatic_assert/OFFSET_CHECK), guaranteeing bit-exact compatibility with the Linuxdrm/imaginationdriver.