drivers/video/fbdev/neofb.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/neofb.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/neofb.c- Extension
.c- Size
- 56079 bytes
- Lines
- 2219
- 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.
- 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/module.hlinux/kernel.hlinux/errno.hlinux/string.hlinux/mm.hlinux/slab.hlinux/delay.hlinux/fb.hlinux/pci.hlinux/init.hlinux/toshiba.hasm/io.hasm/irq.hvideo/vga.hvideo/neomagic.h
Detected Declarations
function write_le32function neoFindModefunction neoCalcVCLKfunction vgaHWInitfunction vgaHWLockfunction vgaHWUnlockfunction neoLockfunction neoUnlockfunction VGAenablePalettefunction VGAdisablePalettefunction VGAwATTRfunction vgaHWProtectfunction vgaHWRestorefunction neo2200_syncfunction neo2200_wait_fifofunction neo2200_accel_initfunction neofb_openfunction neofb_releasefunction neofb_check_varfunction neofb_set_parfunction neofb_pan_displayfunction neofb_setcolregfunction neofb_blankfunction neo2200_fillrectfunction neo2200_copyareafunction neo2200_imageblitfunction neofb_fillrectfunction neofb_copyareafunction neofb_imageblitfunction neofb_syncfunction neofb_draw_cursorfunction neofb_cursorfunction neo_map_mmiofunction neo_unmap_mmiofunction neo_map_videofunction neo_unmap_videofunction neo_scan_monitorfunction neo_init_hwfunction neo_free_fb_infofunction neofb_probefunction neofb_removefunction neofb_setupfunction neofb_initfunction neofb_exitmodule init neofb_init
Annotated Snippet
static struct pci_driver neofb_driver = {
.name = "neofb",
.id_table = neofb_devices,
.probe = neofb_probe,
.remove = neofb_remove,
};
/* ************************* init in-kernel code ************************** */
#ifndef MODULE
static int __init neofb_setup(char *options)
{
char *this_opt;
DBG("neofb_setup");
if (!options || !*options)
return 0;
while ((this_opt = strsep(&options, ",")) != NULL) {
if (!*this_opt)
continue;
if (!strncmp(this_opt, "internal", 8))
internal = 1;
else if (!strncmp(this_opt, "external", 8))
external = 1;
else if (!strncmp(this_opt, "nostretch", 9))
nostretch = 1;
else if (!strncmp(this_opt, "nopciburst", 10))
nopciburst = 1;
else if (!strncmp(this_opt, "libretto", 8))
libretto = 1;
else
mode_option = this_opt;
}
return 0;
}
#endif /* MODULE */
static int __init neofb_init(void)
{
#ifndef MODULE
char *option = NULL;
#endif
if (fb_modesetting_disabled("neofb"))
return -ENODEV;
#ifndef MODULE
if (fb_get_options("neofb", &option))
return -ENODEV;
neofb_setup(option);
#endif
return pci_register_driver(&neofb_driver);
}
module_init(neofb_init);
#ifdef MODULE
static void __exit neofb_exit(void)
{
pci_unregister_driver(&neofb_driver);
}
module_exit(neofb_exit);
#endif /* MODULE */
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: `function write_le32`, `function neoFindMode`, `function neoCalcVCLK`, `function vgaHWInit`, `function vgaHWLock`, `function vgaHWUnlock`, `function neoLock`, `function neoUnlock`, `function VGAenablePalette`, `function VGAdisablePalette`.
- Atlas domain: Driver Families / drivers/video.
- Implementation status: pattern implementation candidate.
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.