vga_put(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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, or NULL if you want the system default. Yes, NULL is 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:

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