vga_tryget(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so welcome to the vga_tryget(9) page from the Kernel API Manual, bestie πŸ’… and the name is literally giving: try to acquire & lock legacy VGA resources 🌸


✨ SYNOPSIS ✨

int vga_tryget (struct pci_dev *pdev , unsigned int rsrc );

πŸŽ€ ARGUMENTS πŸŽ€

  • pdev β€” the PCI device of the VGA card, or NULL for the system default 🫢
  • rsrc β€” a bit mask of the resources to acquire and lock ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

So like, it performs the same operation as vga_get, but instead of blocking when the resources are already locked by another card, it returns an error (-EBUSY) πŸ’€ no waiting around, no cap.

It can be called in any context πŸ‘‘

On success, release the VGA resource again with vga_put πŸŽ€

Return situation: 0 on success, negative error code on failure 😭


🌈 SEE ALSO 🌈

The lore lives in kernel file ./drivers/pci/vgaarb.c β€” go check out vga_default_device(9), vga_remove_vgacon(9), vga_get(9), vga_put(9), vga_set_legacy_decoding(9), and vga_client_register(9) πŸ’œ


mwah πŸ’‹ source/version: ./drivers/pci; date: October 2026 β€” stay iconic, vga_tryget(9) bestie 🫢

πŸ“¦ where this page comes from