__aperture_r..._vga_devices(9)
π __aperture_r..._vga_devices(9) β the kernel API manual page, bestie edition
okay so real talk, this is a section 9 kernel API page (that's the "kernel internals" section, iykyk), and it's literally named __aperture_r..._vga_devices(9) because kernel devs cannot be trusted to fit a function name in a header. we move.
β¨ NAME β¨
__aperture_remove_legacy_vga_devices β removes the legacy VGA devices that belong to a PCI device. that's it, that's the whole gig. π
β¨ SYNOPSIS β¨
int __aperture_remove_legacy_vga_devices (struct pci_dev *pdev );
one function, one pointer, zero drama. (well. mostly zero drama, keep reading.) π
β¨ ARGUMENTS β¨
pdevβ the PCI device in question. that's the whole argument list bestie, we love a low-maintenance signature π«Ά
β¨ DESCRIPTION β¨
so this function removes the VGA devices that pdev provides β think a VGA framebuffer, or a console. iconic cleanup behaviour. π§Ήβ¨
when is this actually useful? when you've got a VGA-compatible PCI graphics device whose framebuffers live in non-BAR locations. your driver should grab ownership of those memory areas first, and afterwards call this helper to release whatever VGA devices are left over. order matters, periodt. π
now if your hardware has its framebuffers accessible via PCI BARs, this is literally not the function for you β use aperture_remove_conflicting_pci_devices instead. that one will release any VGA devices automatically. no cap. π
β οΈ WARNING: apparently we must remove graphics drivers before calling this helper. otherwise the vga fbdev driver falls over if we have vgacon configured. like it just faceplants. so do the removal first or you're gonna have a bad time ππ
β¨ RETURN β¨
0on success π- a negative errno code otherwise π
β¨ SEE ALSO β¨
go read these too, they're all in their own lane and they all ate:
- Kernel file
./drivers/video/aperture.coverview(9)β the big picture, start here π¦ devm_aperture_acquire_for_platform_device(9)πΈaperture_remove_conflicting_devices(9)βaperture_remove_conflicting_pci_devices(9)π₯ β the one you want if your framebuffers are in PCI BARs, remember?
and that's the page!! lived in ./drivers/video, dated October 2026, from the Kernel API Manual β this little icon of a manpage really said "I contain multitudes and also a warning about vgacon." mwah. ππ
π¦ 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