pci_is_vga(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… pci_is_vga β€” the kernel-API-manual page, but make it make sense

okay bestie, quick vibe check: this is pci_is_vga(9) from the Kernel API Manual, and it's genuinely a tiny little function that does one (1) job. let's get into it πŸ’–


✨ NAME ✨

pci_is_vga β€” check if the PCI device is a VGA device πŸ–₯️✨


🌸 SYNOPSIS 🌸

bool pci_is_vga (struct pci_dev *pdev );

like. that's it. that's the whole function signature. she's short and she knows it πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • pdev β€” the PCI device 🫢 (the thing you're asking "hey are you a VGA device" about)

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so bestie, here's the lore πŸ“–. The PCI Code and ID Assignment spec, r1.15, secs 1.4 and 1.1 is out here defining the VGA Base Class and Sub-Classes, and the icons that matter are literally these:

03 00  PCI_CLASS_DISPLAY_VGA      VGA-compatible or 8514-compatible 00
01  PCI_CLASS_NOT_DEFINED_VGA  VGA-compatible (before Class Code)

so the function returns true if the PCI device is a VGA device and uses the legacy VGA resources β€” which are, no cap, exactly these:

  • [mem 0xa0000-0xbffff]
  • [io 0x3b0-0x3bb]
  • [io 0x3c0-0x3df]
  • and aliases ✨

that's the whole check. legacy vibes only, fr fr πŸ”₯


🌈 SEE ALSO 🌈

the whole friend group, in the order they showed up at the function β€” under Kernel file ./include/linux/pci.h:


and that's the page, bestie! 🫢 source is ./include/linux, dated October 2026, version pci_is_vga(9) β€” go off, icon πŸ‘‘βœ¨πŸ’œ

πŸ“¦ where this page comes from