drivers/video/fbdev/via/via-core.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/via/via-core.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/via/via-core.c- Extension
.c- Size
- 19519 bytes
- Lines
- 757
- Domain
- Driver Families
- Bucket
- drivers/video
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/aperture.hlinux/export.hlinux/via-core.hlinux/via_i2c.hvia-gpio.hglobal.hlinux/module.hlinux/interrupt.hlinux/platform_device.hlinux/list.hlinux/pm.h
Detected Declarations
struct viafb_vx855_dma_descrfunction viafb_mmio_writefunction viafb_mmio_readfunction viafb_int_initfunction viafb_irq_enablefunction viafb_irq_disablefunction viafb_dma_irqfunction viafb_request_dmafunction viafb_release_dmafunction viafb_request_dmafunction viafb_get_fb_size_from_pcifunction via_pci_setup_mmiofunction via_pci_teardown_mmiofunction via_create_subdevfunction via_setup_subdevsfunction via_teardown_subdevsfunction viafb_pm_registerfunction viafb_pm_unregisterfunction via_suspendfunction via_resumefunction via_pci_probefunction via_pci_removefunction via_core_initfunction via_core_exitmodule init via_core_initexport viafb_irq_enableexport viafb_irq_disableexport viafb_request_dmaexport viafb_release_dmaexport viafb_dma_copy_out_sgexport viafb_pm_registerexport viafb_pm_unregister
Annotated Snippet
static struct pci_driver via_driver = {
.name = "viafb",
.id_table = via_pci_table,
.probe = via_pci_probe,
.remove = via_pci_remove,
.driver.pm = &via_pm_ops,
};
static int __init via_core_init(void)
{
int ret;
if (fb_modesetting_disabled("viafb"))
return -ENODEV;
ret = viafb_init();
if (ret)
return ret;
viafb_i2c_init();
viafb_gpio_init();
ret = pci_register_driver(&via_driver);
if (ret) {
viafb_gpio_exit();
viafb_i2c_exit();
return ret;
}
return 0;
}
static void __exit via_core_exit(void)
{
pci_unregister_driver(&via_driver);
viafb_gpio_exit();
viafb_i2c_exit();
viafb_exit();
}
module_init(via_core_init);
module_exit(via_core_exit);
Annotation
- Immediate include surface: `linux/aperture.h`, `linux/export.h`, `linux/via-core.h`, `linux/via_i2c.h`, `via-gpio.h`, `global.h`, `linux/module.h`, `linux/interrupt.h`.
- Detected declarations: `struct viafb_vx855_dma_descr`, `function viafb_mmio_write`, `function viafb_mmio_read`, `function viafb_int_init`, `function viafb_irq_enable`, `function viafb_irq_disable`, `function viafb_dma_irq`, `function viafb_request_dma`, `function viafb_release_dma`, `function viafb_request_dma`.
- Atlas domain: Driver Families / drivers/video.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.