pci_is_vga(9)
π 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:
enum pci_interrupt_pin(9)pci_channel_state_t(9)pci_is_bridge(9)pci_is_display(9)struct pci_driver(9)PCI_DEVICE(9)PCI_DEVICE_DRIVER_OVERRIDE(9)PCI_DRIVER_OVERRIDE_DEVICE_VFIO(9)PCI_DEVICE_SUB(9)PCI_DEVICE_CLASS(9)PCI_VDEVICE(9)PCI_VDEVICE_SUB(9)PCI_DEVICE_DATA(9)pcie_capability_clear_and_set_word(9)pci_bus_for_each_resource(9)module_pci_driver(9)builtin_pci_driver(9)pci_irq_type(9)pci_irqd_intx_xlate(9)pci_resource_is_io(9)pci_resource_is_mem(9)pci_pcie_cap(9)pci_is_pcie(9)pcie_caps_reg(9)pci_pcie_type(9)pcie_find_root_port(9)pci_vpd_alloc(9)pci_vpd_find_id_string(9)pci_vpd_find_ro_info_keyword(9)pci_vpd_check_csum(9)pci_ari_enabled(9)pci_is_thunderbolt_attached(9)
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
- 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