pvr_dev_quer...ncements_get(9)
π pvr_dev_quer...ncements_get(9) β from the Kernel API Manual, bestie β¨
okay so you're in the kernel API manual and you found pvr_dev_quer...ncements_get(9) β that's the page. welcome, pull up a chair π
πΈ NAME πΈ
pvr_dev_query_enhancements_get β it unpacks the array of enhancements at the address you gave it in a struct drm_pvr_dev_query_enhancements, or it just tells you how much space you need for that whole situation. two jobs, one function, main character energy π
β¨ SYNOPSIS β¨
int pvr_dev_query_enhancements_get (struct pvr_device *pvr_dev , struct
drm_pvr_ioctl_dev_query_args *args );
like, that's the whole vibe. two args, one int back π«Ά
π¦ ARGUMENTS π¦
pvr_devβ the device pointer, your lil handle on the actual hardware situation πargsβ[IN]device query arguments, and inside them lives a pointer to a userspace structdrm_pvr_dev_query_enhancements. that pointer is the whole point of the operation, no cap
π DESCRIPTION π
so here's the tea π΅ β read these branches carefully, they're doing a lot:
- if the query object pointer is
NULL, then thesizefield gets updated with the expected size of the query object. that's your "how big should this be" mode, iconic - if the userspace pointer in the query object is
NULL, or the count is short β then no data is copied. literally none. don't come for the data, there is no data π - the
countfield will be updated to whichever count actually got copied β or, if either pointer isNULL, it gets updated to the count that would have been copied π - and the
sizefield in the query object gets updated to the size copied
that's it, that's the whole dance. size in, size out, and the count reporting on what did or didn't happen π«
π₯ RETURN π₯
0on success β or also0if size/count is being requested with aNULLpointer, because that's a valid ask, bestie βοΈ-EINVALifargscontained non-zero reserved fields β like, those fields are reserved, respect them π-E2BIGif the indicated length of the allocation is less than what's required to contain the copied data. your buffer is too small, that's the whole problem π-EFAULTif local memory could not be copied to userspace. the copy did not slay, it failed π
π SEE ALSO π
the whole friend group, in order, exactly as listed:
- Kernel file
./drivers/gpu/drm/imagination/pvr_drv.cβ PowerVR (Series 6 and later) and IMG Graphics Driver(9) pvr_ioctl_create_bo(9)pvr_ioctl_get_bo_mmap_offset(9)pvr_dev_query_gpu_info_get(9)pvr_dev_query_runtime_info_get(9)pvr_dev_query_quirks_get(9)pvr_ioctl_dev_query(9)pvr_ioctl_create_context(9)pvr_ioctl_destroy_context(9)pvr_ioctl_create_free_list(9)pvr_ioctl_destroy_free_list(9)pvr_ioctl_create_hwrt_dataset(9)pvr_ioctl_destroy_hwrt_dataset(9)pvr_ioctl_create_vm_context(9)pvr_ioctl_destroy_vm_context(9)pvr_ioctl_vm_map(9)pvr_ioctl_vm_unmap(9)pvr_drm_driver_open(9)pvr_drm_driver_postclose(9)
that's nineteen friends plus the driver file. go read them all, i'll wait π§
and that's the page!! source situation: ./drivers/gpu/drm/imagination, dated October 2026 β mwah, love that for us, bye bestie π
ππ
π¦ 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