drivers/video/fbdev/i740fb.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/i740fb.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/i740fb.c- Extension
.c- Size
- 33878 bytes
- Lines
- 1317
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/aperture.hlinux/module.hlinux/kernel.hlinux/errno.hlinux/string.hlinux/mm.hlinux/slab.hlinux/delay.hlinux/fb.hlinux/init.hlinux/pci.hlinux/pci_ids.hlinux/i2c.hlinux/i2c-algo-bit.hlinux/console.hvideo/vga.hi740_reg.h
Detected Declarations
struct i740fb_parfunction i740outbfunction i740inbfunction i740outregfunction i740inregfunction i740outreg_maskfunction i740fb_ddc_setsclfunction i740fb_ddc_setsdafunction i740fb_ddc_getsclfunction i740fb_ddc_getsdafunction i740fb_setup_ddc_busfunction i740fb_openfunction i740fb_releasefunction i740_calc_fifofunction i740_calc_vclkfunction i740fb_decode_varfunction i740fb_check_varfunction vga_protectfunction vga_unprotectfunction i740fb_set_parfunction i740fb_setcolregfunction i740fb_pan_displayfunction i740fb_blankfunction i740fb_probefunction i740fb_removefunction i740fb_suspendfunction i740fb_resumefunction i740fb_setupfunction i740fb_initfunction i740fb_exitmodule init i740fb_init
Annotated Snippet
static struct pci_driver i740fb_driver = {
.name = "i740fb",
.id_table = i740fb_id_table,
.probe = i740fb_probe,
.remove = i740fb_remove,
.driver.pm = &i740fb_pm_ops,
};
#ifndef MODULE
static int __init i740fb_setup(char *options)
{
char *opt;
if (!options || !*options)
return 0;
while ((opt = strsep(&options, ",")) != NULL) {
if (!*opt)
continue;
else if (!strncmp(opt, "mtrr:", 5))
mtrr = simple_strtoul(opt + 5, NULL, 0);
else
mode_option = opt;
}
return 0;
}
#endif
static int __init i740fb_init(void)
{
#ifndef MODULE
char *option = NULL;
#endif
if (fb_modesetting_disabled("i740fb"))
return -ENODEV;
#ifndef MODULE
if (fb_get_options("i740fb", &option))
return -ENODEV;
i740fb_setup(option);
#endif
return pci_register_driver(&i740fb_driver);
}
static void __exit i740fb_exit(void)
{
pci_unregister_driver(&i740fb_driver);
}
module_init(i740fb_init);
module_exit(i740fb_exit);
MODULE_AUTHOR("(c) 2011 Ondrej Zary <linux@rainbow-software.org>");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("fbdev driver for Intel740");
module_param(mode_option, charp, 0444);
MODULE_PARM_DESC(mode_option, "Default video mode ('640x480-8@60', etc)");
module_param(mtrr, int, 0444);
MODULE_PARM_DESC(mtrr, "Enable write-combining with MTRR (1=enable, 0=disable, default=1)");
Annotation
- Immediate include surface: `linux/aperture.h`, `linux/module.h`, `linux/kernel.h`, `linux/errno.h`, `linux/string.h`, `linux/mm.h`, `linux/slab.h`, `linux/delay.h`.
- Detected declarations: `struct i740fb_par`, `function i740outb`, `function i740inb`, `function i740outreg`, `function i740inreg`, `function i740outreg_mask`, `function i740fb_ddc_setscl`, `function i740fb_ddc_setsda`, `function i740fb_ddc_getscl`, `function i740fb_ddc_getsda`.
- 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.
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.