vga_client_register(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… vga_client_register(9)

okay so bestie, welcome to the Kernel API Manual page for vga_client_register(9) β€” yes the number is part of the name, it's a section-9 thing, iykyk πŸŽ€


✨ NAME ✨

vga_client_register β€” register or unregister a VGA arbitration client πŸ–₯️✨


🌸 SYNOPSIS 🌸

int vga_client_register (struct pci_dev *pdev , unsigned int
(*set_decode)(struct pci_dev *pdev, bool decode) );

like, that's the whole signature, no cap πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • pdev β€” the PCI device of the VGA client 🫢
  • set_decode β€” the VGA decode change callback, aka the little function that gets pinged when decode state changes ⭐

πŸ’– DESCRIPTION πŸ’–

okay so here's the tea β€” clients have two callback mechanisms they can use. two. iconic behaviour honestly πŸ‘‘

set_decode callback: if a client can disable its GPU VGA resource, it will get a callback from this to set the encode/decode state. literally that simple 🧚

Rationale: (yes we're doing the why, it matters) we cannot disable VGA decode resources unconditionally because some single GPU laptops seem to require ACPI or BIOS access to the VGA registers to control things like backlights etc. hopefully newer multi-GPU laptops do something saner, and desktops won't have any special ACPI for this. the driver will get a callback when VGA arbitration is first used by userspace since some older X servers have issues 😭 (legacy X, we love you but bestie…)

🚨 real talk: this function does not check whether a client for pdev has been registered already. no vibe check, no dupe detection. so like, be careful πŸ’€

to unregister, call vga_client_unregister. that's it, that's the exit strategy πŸšͺ✨


⭐ RETURN ⭐

  • 0 on success πŸŽ‰
  • -ENODEV on failure πŸ˜”

🌈 SEE ALSO 🌈

all the vga besties in one place πŸ«ΆπŸ’œ


and that's the page!! mwah πŸ’‹ this one lives under ./drivers/pci, and the version you're reading is dated October 2026 β€” go forth and arbitrate responsibly, queen πŸ‘‘πŸ’…πŸ¦‹

πŸ“¦ where this page comes from