STRUCT PVR_CONTEXT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ struct pvr_context(9) πŸ’œ

okay so bestie, we're deep in the Kernel API Manual today and this one is literally the blueprint for a PVR context. think of it as the group chat member list for everything a context needs to know about itself. it's giving "one struct to hold them all" ✨


🌸 NAME 🌸

struct pvr_context β€” Context data. that's it, that's the tweet. it's the struct that holds all the context data, periodt.


πŸ¦‹ SYNOPSIS πŸ¦‹

lowkey the whole shape of it, exactly as it lives in the header:

struct pvr_context {
    struct kref ref_count;
    struct pvr_device *pvr_dev;
    struct pvr_vm_context *vm_ctx;
    enum drm_pvr_ctx_type type;
    u32 flags;
    enum pvr_context_priority priority;
    struct pvr_fw_object *fw_obj;
    void *data;
    u32 data_size;
    u32 ctx_id;
    atomic_t faulty;
    union {
      struct {
        struct pvr_queue *geometry;
        struct pvr_queue *fragment;
      };
      struct pvr_queue *compute;
      struct pvr_queue *transfer;
    } queues;
    struct list_head file_link;
 };

no cap, that's the whole vibe right there πŸ‘‘


πŸŽ€ Members πŸŽ€

bestie we are going member by member, no skipping, i promise 🫢

  • ref_count β€” the Refcount for the context. classic reference-counting behaviour, she's counting her friends πŸ’…
  • pvr_dev β€” Pointer to the owning device. the context's parent, its main character origin story.
  • vm_ctx β€” Pointer to the associated VM context. the VM bestie this context is linked with.
  • type β€” the Type of context. what kind of girl is she.
  • flags β€” Context flags. all the lil boolean-ish details, filed under "flags" as one does ✨
  • priority β€” the Context priority. how urgently she wants the GPU's attention, ngl.
  • fw_obj β€” the FW object representing the FW-side context data. firmware's copy of the lore, basically.
  • data β€” Pointer to the local copy of the FW context data. yep, we keep one too.
  • data_size β€” Size of the FW context data, in bytes. units matter, always 🌸
  • ctx_id β€” the FW context ID. her government name in firmware-land.
  • faulty β€” Set to 1 when the context queues had unfinished job when a GPU reset happened.
🚨 okay this is the important one, so listen up: in that case, the context is in an inconsistent state and can't be used anymore. like, at all. she's done. do not try to reuse her, that's not a vibe, that's a bug 😭
  • queues β€” the Union containing all kind of queues. she contains multitudes πŸ¦‹
  • {unnamed_struct} β€” anonymous. that's literally all it says, it's an anonymous member, iykyk πŸ™ˆ
  • file_link β€” the pvr_file PVR context list link. the little hand-holding chain back to the file's list.

⭐ SEE ALSO ⭐

go read these next, bestie, they're all linked in the header:


and that's the whole page, no notes πŸ’– this absolute icon came out of ./drivers/gpu/drm/imagination and it's dated October 2026, so mark your calendars bestie πŸ“…βœ¨ slay, bye! πŸŽ€

πŸ“¦ where this page comes from