drivers/gpu/drm/mgag200/mgag200_drv.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/mgag200/mgag200_drv.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/mgag200/mgag200_drv.c- Extension
.c- Size
- 7619 bytes
- Lines
- 316
- 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.hdrm/clients/drm_client_setup.hdrm/drm_atomic_helper.hdrm/drm_drv.hdrm/drm_fbdev_shmem.hdrm/drm_file.hdrm/drm_fourcc.hdrm/drm_ioctl.hdrm/drm_managed.hdrm/drm_module.hdrm/drm_print.hmgag200_drv.h
Detected Declarations
function mgag200_init_pci_optionsfunction mgag200_probe_vramfunction mgag200_device_probe_vramfunction mgag200_device_preinitfunction mgag200_device_initfunction mgag200_pci_probefunction mgag200_pci_removefunction mgag200_pci_shutdown
Annotated Snippet
static struct pci_driver mgag200_pci_driver = {
.name = DRIVER_NAME,
.id_table = mgag200_pciidlist,
.probe = mgag200_pci_probe,
.remove = mgag200_pci_remove,
.shutdown = mgag200_pci_shutdown,
};
drm_module_pci_driver_if_modeset(mgag200_pci_driver, mgag200_modeset);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/aperture.h`, `linux/module.h`, `linux/pci.h`, `drm/clients/drm_client_setup.h`, `drm/drm_atomic_helper.h`, `drm/drm_drv.h`, `drm/drm_fbdev_shmem.h`, `drm/drm_file.h`.
- Detected declarations: `function mgag200_init_pci_options`, `function mgag200_probe_vram`, `function mgag200_device_probe_vram`, `function mgag200_device_preinit`, `function mgag200_device_init`, `function mgag200_pci_probe`, `function mgag200_pci_remove`, `function mgag200_pci_shutdown`.
- 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.