drivers/video/fbdev/savage/savagefb_driver.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/savage/savagefb_driver.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/savage/savagefb_driver.c- Extension
.c- Size
- 66302 bytes
- Lines
- 2584
- 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/pci.hlinux/init.hlinux/console.hasm/io.hasm/irq.hsavagefb.h
Detected Declarations
enum ACTIVE_DISPLAYSfunction vgaHWSeqResetfunction vgaHWProtectfunction vgaHWRestorefunction vgaHWInitfunction savage3D_waitfifofunction savage4_waitfifofunction savage2000_waitfifofunction savage3D_waitidlefunction savage4_waitidlefunction savage2000_waitidlefunction SavageSetup2DEnginefunction savagefb_set_clipfunction SavageSetup2DEnginefunction common_calc_clockfunction SavagePrintRegsfunction savage_get_default_parfunction savage_set_default_parfunction savage_update_varfunction savagefb_check_varfunction savagefb_decode_varfunction savagefb_setcolregfunction savagefb_set_par_intfunction savagefb_update_startfunction savagefb_set_fixfunction savagefb_set_parfunction savagefb_pan_displayfunction savagefb_blankfunction savagefb_openfunction savagefb_releasefunction savage_enable_mmiofunction savage_disable_mmiofunction savage_map_mmiofunction savage_unmap_mmiofunction savage_map_videofunction savage_unmap_videofunction savage_init_hwfunction savage_init_fb_infofunction savagefb_probefunction savagefb_removefunction savagefb_suspend_latefunction savagefb_suspendfunction savagefb_hibernatefunction savagefb_freezefunction savagefb_resumefunction savage_donefunction savagefb_setupfunction savagefb_init
Annotated Snippet
static struct pci_driver savagefb_driver = {
.name = "savagefb",
.id_table = savagefb_devices,
.probe = savagefb_probe,
.driver.pm = &savagefb_pm_ops,
.remove = savagefb_remove,
};
/* **************************** exit-time only **************************** */
static void __exit savage_done(void)
{
DBG("savage_done");
pci_unregister_driver(&savagefb_driver);
}
/* ************************* init in-kernel code ************************** */
static int __init savagefb_setup(char *options)
{
#ifndef MODULE
char *this_opt;
if (!options || !*options)
return 0;
while ((this_opt = strsep(&options, ",")) != NULL) {
mode_option = this_opt;
}
#endif /* !MODULE */
return 0;
}
static int __init savagefb_init(void)
{
char *option;
DBG("savagefb_init");
if (fb_modesetting_disabled("savagefb"))
return -ENODEV;
if (fb_get_options("savagefb", &option))
return -ENODEV;
savagefb_setup(option);
return pci_register_driver(&savagefb_driver);
}
module_init(savagefb_init);
module_exit(savage_done);
module_param(mode_option, charp, 0);
MODULE_PARM_DESC(mode_option, "Specify initial video mode");
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: `enum ACTIVE_DISPLAYS`, `function vgaHWSeqReset`, `function vgaHWProtect`, `function vgaHWRestore`, `function vgaHWInit`, `function savage3D_waitfifo`, `function savage4_waitfifo`, `function savage2000_waitfifo`, `function savage3D_waitidle`, `function savage4_waitidle`.
- 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.