STRUCT VGASR_PRIV(9)
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β whethervga_switcheroois 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 forvga_switcheroodebugfs 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 π
Kernel file ./drivers/gpu/vga/vga_switcheroo.c Overview(9)struct vga_switcheroo_client(9)vga_switcheroo_register_handler(9)vga_switcheroo_unregister_handler(9)vga_switcheroo_handler_flags(9)vga_switcheroo_register_client(9)vga_switcheroo_register_audio_client(9)vga_switcheroo_client_probe_defer(9)vga_switcheroo_get_client_state(9)vga_switcheroo_unregister_client(9)vga_switcheroo_client_fb_set(9)vga_switcheroo_lock_ddc(9)vga_switcheroo_unlock_ddc(9)Manual switching and manual power control(9)vga_switcheroo_process_delayed_switch(9)Driver power control(9)vga_switcheroo_init_domain_pm_ops(9)
source/version:./drivers/gpu/vgaΒ· date:October 2026Β· page:struct vgasr_priv(9)πβ¨π
π¦ 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