vga_put(9)
π vga_put(9) β from the Kernel API Manual, bestie
okay so picture this: it's a beautiful day in the kernel, and somebody has to give back the legacy VGA lock. That somebody is vga_put. She's the friend who actually returns your hoodie. Iconic behaviour, honestly. π
β¨ NAME β¨
vga_put β release lock on legacy VGA resources
Like, release the lock, bestie. Let the other processes breathe. π¦
β¨ SYNOPSIS β¨
void vga_put (struct pci_dev *pdev , unsigned int rsrc );
That's the whole vibe. Two args, no drama. π
πΈ ARGUMENTS πΈ
pdevβ the PCI device of the VGA card, orNULLif you want the system default. Yes,NULLis a valid choice here, she's not judging. πrsrcβ the bit mask of the resource you're releasing. Bit mask. Mask of bits. You know the drill. β¨
π DESCRIPTION π
Okay so real talk: this function releases resources that were previously locked by vga_get or vga_tryget. So if you never grabbed them with those, there's nothing to give back. Chain of custody, periodt. π₯
Here's the cute part β the resources aren't disabled right away. Nope. They linger, on purpose, so that a subsequent vga_get on the same card will succeed immediately. It's giving prepared, it's giving lowkey efficient. Main character energy for real. π
And because the kernel does not play about bookkeeping: resources have a counter. So locks are only released if the counter reaches 0. Not 1. Not "close enough". <rainbow>ZERO.</rainbow> β The counter said what it said. π
ngl, if you're expecting an instant disable, that is not this function's job. She just releases the lock. Don't put that on her. π«Ά
π¦ SEE ALSO π¦
Kernel file ./drivers/pci/vgaarb.c β the whole friend group lives there:
vga_default_device(9)vga_remove_vgacon(9)vga_get(9)vga_tryget(9)vga_set_legacy_decoding(9)vga_client_register(9)
iykyk π
and that's the page, bestie!! brought to you by the legends over in ./drivers/pci, dated October 2026, under the very official title vga_put(9) in the Kernel API Manual. mwah ππΈ go release some locks responsibly, ily π«Άβ¨
π¦ 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