Role of the Linux driver
Mainline Linux’s drm/imagination driver (drivers/gpu/drm/imagination/,
module powervr.ko) drives the Imagination Rogue GPU from the host RISC-V CPUs
and treats the MIPS firmware as an autonomous coprocessor that owns the
internal GPU scheduling, cache flushes, power handshakes and hardware
recovery.
Responsibilities on the host side
Around firmware boot and normal operation, powervr.ko performs the
following tasks:
SoC enablement: powers on the K1 APMU GPU domain (
K1_PD_GPU), enables the core clock (CLK_GPU), de-assertsRESET_GPU, maps the 512 KiB MMIO window at0xCAC00000and claims IRQ 75 (Kernel integration).Firmware loading and parsing: loads
powervr/rogue_36.29.52.182_v1.fwvia the kernel firmware loader (/lib/firmware/updates/powervr/overrides/lib/firmware/powervr/), parses the trailing 4 KiB header, layout table and device-info block, and printsFW version v1.0 (build 1 OS)(Firmware container and ABI).Device feature discovery: constructs its entire feature, BRN and ERN view of the GPU from the firmware’s device-info block. Missing flags change host behaviour directly — for example,
SYS_BUS_SECURE_RESETis required for the host to clearROGUE_CR_SYS_BUS_SECURE(E001), andLAYOUT_MARS = 1makespvr_fw_stop()checkMARS_IDLE.Firmware heap allocation and mapping: allocates the
codeanddatafirmware objects according to the 6-entry layout table, builds the 4-page MIPS page table covering the 16 MiB firmware heap at0xC0000000, configures the fixed MIPS wrapper remaps (MIPS_ADDR_REMAP1..5), populatesBOOT_DATA,sysinit(0xC0FF0000) andosinit(0xC0FE0000), and setsfirmware_started = 0.MIPS reset release and handshake: clears
SYS_BUS_SECUREand releases the MIPS core at0xBFC00000, then pollsfirmware_started == 1before registering the DRM device ([drm] Initialized powervr 1.0.0 for cac00000.gpu).Command submission and completion: writes Kernel CCB (KCCB) entries, pokes
ROGUE_CR_MTS_SCHEDULE, waits on KCCB return slots and GPU interrupts (IRQ 75, disambiguated viaosdata.interrupt_count[0]), consumes Firmware CCB (FWCCB) notifications, and decodes the firmware trace buffer in debugfs (Host ↔ firmware protocol).Runtime PM: after
active_pm_latency_msof idle time (whensysdata.pow_state == IDLEand KCCB is empty), runs theFORCED_IDLE_REQ→OFF_REQhandshake overKCCB_POW, powers down the APMU domain, and performs a full warm boot on the next job (E005).
Userspace stack (Mesa pvr)
Userspace Vulkan workloads run through Mesa’s pvr ICD
(powervr_mesa_icd.riscv64.json) with
PVR_I_WANT_A_BROKEN_VULKAN_DRIVER=1:
vulkaninfoenumeratesPowerVR B-Series BXE-2-32 MC1.Mesa submits compute (
CDM), transfer (TQ_3D) and graphics (GEOM/FRAG) command buffers through DRM ioctls, whichpowervr.koplaces into per-context client CCBs (cCCBs) with timelineFENCE_PRand sync-checkpoint UFOs.TDM/TQ_2Dtransfers are not emitted by Mesa on BXE-2-32; buffer copies and fills go throughTQ_3Don the fragment data master.Mainline
powervr.koleaves GPU clock gating inAUTO, does not allocate a HWPerf buffer, writes no time-correlation entries of its own, does not sendKCCB_SLCFLUSHINVAL, and logs FWCCBCONTEXT_RESET_NOTIFICATIONevents todmesg(E025).