pvr_rogue_fwif_sf.h)The mainline Linux driver drivers/gpu/drm/imagination publishes the complete encoding scheme and log string table in pvr_rogue_fwif_sf.h (GPL-2.0-only OR MIT). Since the firmware writes only 32-bit numeric IDs into tracebuf (with no ASCII strings in the MIPS image), the Linux driver translates these IDs into human-readable messages in debugfs.
sf_id ([P])Defined directly in pvr_rogue_fwif_sf.h:
#define ROGUE_FW_LOG_IDMARKER 0x70000000U
#define ROGUE_FW_LOG_IDMASK 0xFFF00000U
#define ROGUE_FW_LOG_CREATESFID(seq, group, num_params) \
((u32)(seq) | ((u32)(group) << 12) | ((u32)(num_params) << 16) | ROGUE_FW_LOG_IDMARKER)
| Bits | Field | Public Macro | Meaning |
|---|---|---|---|
[31:20] |
Fixed marker | ROGUE_FW_LOG_IDMARKER |
Always 0x700 (0x70000000) |
[19:16] |
num_params |
ROGUE_FW_SF_PARAMNUM(x) |
Number of u32 argument words following the timestamp (0..15) |
[15:12] |
group_id |
ROGUE_FW_SF_GID(x) |
Group index in enum rogue_fw_log_sfgroups (0..15) |
[11:0] |
seq_id |
x & 0xFFF |
Sequential message index within the group |
enum rogue_fw_log_sfgroups) and log_type Mask ([P])To decide whether an event in group G should be written to tracebuf, the firmware tests (tracebuf.log_type & (1U << G)) != 0 (with ROGUE_FWIF_LOG_TYPE_TRACE active):
group_id |
Public Enum | Bit in log_type |
Covered Subsystem |
|---|---|---|---|
0 |
ROGUE_FW_GROUP_NULL |
0x0001 |
No group / reserved |
1 |
ROGUE_FW_GROUP_MAIN |
0x0002 |
DM kicks and completions (TA, 3D, 3D-TQ, CDM), RTA, main state |
2 |
ROGUE_FW_GROUP_CLEANUP |
0x0004 |
KCCB_CMD_CLEANUP commands (busy/freed resources) |
3 |
ROGUE_FW_GROUP_CSW |
0x0008 |
Context Switch (store start, store finished, resume) |
4 |
ROGUE_FW_GROUP_PM |
0x0010 |
Parameter Manager (freelist load/unload, stack tops) |
5 |
ROGUE_FW_GROUP_RTD |
0x0020 |
HWRTData lifecycle (KICKTA..3DFINISHED states) |
6 |
ROGUE_FW_GROUP_SPM |
0x0040 |
PM Out-of-Memory, FREELIST_GROW, Partial Render, and TA resume |
7 |
ROGUE_FW_GROUP_MTS |
0x0080 |
BG (HW0) and IRQ (HW1) task entry/exit, MTS kicks |
8 |
ROGUE_FW_GROUP_BIF |
0x0100 |
MemCtx activation/deactivation, BIF_CAT_BASE1..7 LRU replacement |
9 |
ROGUE_FW_GROUP_MISC |
0x0200 |
Miscellaneous events / boot / utilities |
10 |
ROGUE_FW_GROUP_POW |
0x0400 |
POW_ON/IDLE/OFF transitions, unit power control (0x0038), APM |
11 |
ROGUE_FW_GROUP_HWR |
0x0800 |
Lockup detection, MMU fault, HWR reset progress, poll timeouts |
12 |
ROGUE_FW_GROUP_HWP |
0x1000 |
HWPerf stream control and configuration |
13 |
ROGUE_FW_GROUP_RPM |
0x2000 |
Ray Parameter Manager (unused on K3) |
14 |
ROGUE_FW_GROUP_DMA |
0x4000 |
Firmware DMA transfers (unused on K3 MIPS) |
15 |
ROGUE_FW_GROUP_DBG |
0x8000 |
Diagnostics / assertions |
[P])The clean-room team can directly include the public IDs from the stid_fmts[] table in pvr_rogue_fwif_sf.h to emit diagnostics compatible with pvr_fw_trace.c. Examples of very useful milestones during K3 debugging:
MTS Group (7): HW1 start/end (EVENT_STATUS received), MTS_SCHEDULE dispatch.MAIN Group (1): GEOM, FRAG, TQ_3D, and CDM kick and completion, RTA slice count.BIF Group (8): hit/miss in LRU allocation of BIF_CAT_BASE1..7 banks.PM (4) / RTD (5) / SPM (6) Groups: freelist/HWRTData load, PM_OOM event, PR start/end, and TA resume.CSW Group (3): TA, 3D, and CDM store start/finished.POW Group (10): hardware power requests (0x0038), response latency, and POW_IDLE/POW_OFF entry.HWR Group (11): CR poll failure, MMU_PAGE_FAULT, HWR reset attempts, and reset completion.