drivers/video/fbdev/sm712fb.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/sm712fb.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/sm712fb.c- Extension
.c- Size
- 49131 bytes
- Lines
- 1780
- 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.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- 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/io.hlinux/fb.hlinux/pci.hlinux/init.hlinux/slab.hlinux/uaccess.hlinux/module.hlinux/console.hlinux/pm.hsm712.h
Detected Declarations
struct smtcfb_screen_infostruct smtcfb_infostruct vesa_modefunction sm7xx_vga_setupfunction sm712_setpalettefunction chan_to_fieldfunction smtc_blankfunction smtc_setcolregfunction smtcfb_readfunction smtcfb_writefunction sm7xx_set_timingfunction smtc_set_timingfunction smtcfb_setmodefunction smtc_check_varfunction smtc_set_parfunction smtc_unmap_mmiofunction smtc_map_smemfunction smtc_unmap_smemfunction sm7xx_init_hwfunction sm7xx_vram_probefunction sm7xx_resolution_probefunction smtcfb_pci_probefunction smtcfb_pci_removefunction smtcfb_pci_suspendfunction smtcfb_pci_resumefunction sm712fb_initfunction sm712fb_exitmodule init sm712fb_init
Annotated Snippet
static struct pci_driver smtcfb_driver = {
.name = "smtcfb",
.id_table = smtcfb_pci_table,
.probe = smtcfb_pci_probe,
.remove = smtcfb_pci_remove,
.driver.pm = &sm7xx_pm_ops,
};
static int __init sm712fb_init(void)
{
char *option = NULL;
if (fb_modesetting_disabled("sm712fb"))
return -ENODEV;
if (fb_get_options("sm712fb", &option))
return -ENODEV;
if (option && *option)
mode_option = option;
sm7xx_vga_setup(mode_option);
return pci_register_driver(&smtcfb_driver);
}
module_init(sm712fb_init);
static void __exit sm712fb_exit(void)
{
pci_unregister_driver(&smtcfb_driver);
}
module_exit(sm712fb_exit);
MODULE_AUTHOR("Siliconmotion ");
MODULE_DESCRIPTION("Framebuffer driver for SMI Graphic Cards");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/aperture.h`, `linux/io.h`, `linux/fb.h`, `linux/pci.h`, `linux/init.h`, `linux/slab.h`, `linux/uaccess.h`, `linux/module.h`.
- Detected declarations: `struct smtcfb_screen_info`, `struct smtcfb_info`, `struct vesa_mode`, `function sm7xx_vga_setup`, `function sm712_setpalette`, `function chan_to_field`, `function smtc_blank`, `function smtc_setcolreg`, `function smtcfb_read`, `function smtcfb_write`.
- Atlas domain: Driver Families / drivers/video.
- Implementation status: pattern implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
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.