pvr_fw_objec...eate_and_map(9)
π pvr_fw_objec...eate_and_map β from the Kernel API Manual β¨
okay bestie, buckle up, because this one's a two-for-one deal: we're creating a firmware object and mapping it to both the firmware and the CPU in one single glow-up. no cap. π
β¨ NAME β¨
pvr_fw_object_create_and_map β literally creates a FW object and maps it to firmware and CPU. both. at once. main character energy, honestly.
π¦ SYNOPSIS π¦
void * pvr_fw_object_create_and_map (struct pvr_device *pvr_dev , size_t
size , u64 flags , void (*init)(void *cpu_ptr, void *priv) , void
*init_priv , struct pvr_fw_object **fw_obj_out );
like, six whole arguments. she's got range. π
πΈ ARGUMENTS πΈ
pvr_devβ the PowerVR device pointer. your fave device, the one we're doing all this for π«Άsizeβ how big the object is, in bytes. measure twice, cut once, iykyk.flagsβ the options that affect, and i quote, both this operation and future mapping operations performed on the returned object. it must be a combination ofDRM_PVR_BO_*and/orPVR_BO_*flags. no mixing random stuff in, she's picky πinitβ the initialisation callback. signature isvoid (*init)(void *cpu_ptr, void *priv)β like, that exact shape, mwah.init_privβ a private pointer that gets passed straight into the initialisation callback. secret little handoff π€«fw_obj_outβ pointer to the location where the created object pointer gets stored. so it comes back out, bestie.
π₯ DESCRIPTION π₯
so like, DRM_PVR_BO_DEVICE_PM_FW_PROTECT is implied for all FW objects. like it's just the vibe, it's built in, you don't ask for it.
and consequently (ugh, love that word), this function will straight-up fail if flags has DRM_PVR_BO_CPU_ALLOW_USERSPACE_ACCESS set. π so don't do that. fr fr. that combo is not it.
β οΈ also, and this one's important: the caller is responsible for calling pvr_fw_object_vunmap to release the CPU mapping. you made the map, you clean up the map. no leaving it for someone else, that's not very slay of you π
π RETURN π
- a pointer to the CPU mapping of the newly created object, or
- any error returned by
pvr_fw_object_create, or - any error returned by
pvr_fw_object_vmap.
like, three possible outcomes. it's giving β¨mysteryβ¨. check your return values, bestie, always.
π SEE ALSO π
Kernel file ./drivers/gpu/drm/imagination/pvr_fw.c, plus the whole friend group:
pvr_fw_validate(9)pvr_fw_process(9)pvr_wait_for_fw_boot(9)pvr_fw_validate_init_device_info(9)pvr_fw_init(9)pvr_fw_fini(9)pvr_fw_mts_schedule(9)pvr_fw_structure_cleanup(9)pvr_fw_object_fw_map(9)pvr_fw_object_fw_unmap(9)pvr_fw_object_create(9)pvr_fw_object_create_and_map_offset(9)pvr_fw_object_destroy(9)pvr_fw_object_get_fw_addr_offset(9)
and that's the page, bestie! π§ββοΈ this absolute banger lives over in ./drivers/gpu/drm/imagination, and it's dated October 2026 β yes, the future, she's ahead of her time. mwah, go forth and map responsibly π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms