STRUCT VGASR_PRIV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

struct vgasr_priv(9) πŸ’…

okay so bestie, this page comes straight out of the Kernel API Manual, and it's giving kernel-internals main character energy fr fr. We're talking about struct vgasr_priv β€” the private-data situation for vga_switcheroo. No cap, it's lowkey iconic in a deeply nerdy way. 🫢


πŸ’– NAME πŸ’–

struct vgasr_priv β€” vga_switcheroo private data. That's the name, that's the vibe, periodt. ✨


✨ SYNOPSIS ✨

struct vgasr_priv {
    bool active;
    bool delayed_switch_active;
    enum vga_switcheroo_client_id delayed_client_id;
    struct dentry *debugfs_root;
    int registered_clients;
    struct list_head clients;
    const struct vga_switcheroo_handler *handler;
    enum vga_switcheroo_handler_flags_t handler_flags;
    struct mutex mux_hw_lock;
    int old_ddc_owner;
};

🌸 Members 🌸

  • active β€” whether vga_switcheroo is enabled. Prerequisite is the registration of two GPUs and a handler. Like, you don't just walk in here without the right setup, okay? πŸ’β€β™€οΈ
  • delayed_switch_active β€” whether a delayed switch is pending. It's the "wait, are we doing this later?" flag. ⏳
  • delayed_client_id β€” client to which a delayed switch is pending. So we know exactly who the delayed switch is waiting on, iykyk. 🎯
  • debugfs_root β€” directory for vga_switcheroo debugfs interface. Debug girlies, this one's for you. πŸ›βœ¨
  • registered_clients β€” number of registered GPUs (counting only vga clients, not audio clients). Important distinction bestie, don't mix them up. 🎧🚫
  • clients β€” list of registered clients. The whole little client roster. πŸ“‹
  • handler β€” registered handler. The handler that got registered, literally right there in the name. πŸ’…
  • handler_flags β€” flags of registered handler. Flags on flags on flags. 🚩
  • mux_hw_lock β€” protects mux state (in particular while DDC lines are temporarily switched). It's the lock keeping the mux state from getting messy while those DDC lines are in temporary-switch mode. πŸ”’
  • old_ddc_owner β€” client to which DDC lines will be switched back on unlock. So when unlock happens, we know where the DDC lines are going back to. πŸ”

πŸ¦‹ Description πŸ¦‹

vga_switcheroo private data. Currently only one vga_switcheroo instance per system is supported. That's it β€” one instance, one system, no sharing, no extra copies, no "but what if we justβ€”" bestie, no. πŸ™ˆ


πŸŽ€ SEE ALSO πŸŽ€


source/version: ./drivers/gpu/vga Β· date: October 2026 Β· page: struct vgasr_priv(9) πŸŒˆβœ¨πŸ’–
πŸ“¦ where this page comes from