drivers/gpu/drm/vboxvideo/vbox_drv.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/vboxvideo/vbox_drv.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/vboxvideo/vbox_drv.c- Extension
.c- Size
- 4526 bytes
- Lines
- 206
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/aperture.hlinux/module.hlinux/pci.hlinux/vt_kern.hdrm/clients/drm_client_setup.hdrm/drm_atomic_helper.hdrm/drm_drv.hdrm/drm_fbdev_ttm.hdrm/drm_file.hdrm/drm_ioctl.hdrm/drm_managed.hdrm/drm_modeset_helper.hdrm/drm_module.hvbox_drv.h
Detected Declarations
function vbox_pci_probefunction vbox_pci_removefunction vbox_pci_shutdownfunction vbox_pm_suspendfunction vbox_pm_resumefunction vbox_pm_freezefunction vbox_pm_thawfunction vbox_pm_poweroff
Annotated Snippet
static struct pci_driver vbox_pci_driver = {
.name = DRIVER_NAME,
.id_table = pciidlist,
.probe = vbox_pci_probe,
.remove = vbox_pci_remove,
.shutdown = vbox_pci_shutdown,
.driver.pm = pm_sleep_ptr(&vbox_pm_ops),
};
DEFINE_DRM_GEM_FOPS(vbox_fops);
static const struct drm_driver driver = {
.driver_features =
DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC | DRIVER_CURSOR_HOTSPOT,
.fops = &vbox_fops,
.name = DRIVER_NAME,
.desc = DRIVER_DESC,
.major = DRIVER_MAJOR,
.minor = DRIVER_MINOR,
.patchlevel = DRIVER_PATCHLEVEL,
DRM_GEM_VRAM_DRIVER,
DRM_FBDEV_TTM_DRIVER_OPS,
};
drm_module_pci_driver_if_modeset(vbox_pci_driver, vbox_modeset);
MODULE_AUTHOR("Oracle Corporation");
MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>");
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL and additional rights");
Annotation
- Immediate include surface: `linux/aperture.h`, `linux/module.h`, `linux/pci.h`, `linux/vt_kern.h`, `drm/clients/drm_client_setup.h`, `drm/drm_atomic_helper.h`, `drm/drm_drv.h`, `drm/drm_fbdev_ttm.h`.
- Detected declarations: `function vbox_pci_probe`, `function vbox_pci_remove`, `function vbox_pci_shutdown`, `function vbox_pm_suspend`, `function vbox_pm_resume`, `function vbox_pm_freeze`, `function vbox_pm_thaw`, `function vbox_pm_poweroff`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.