drivers/staging/sm750fb/sm750.c
Source file repositories/reference/linux-study-clean/drivers/staging/sm750fb/sm750.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/sm750fb/sm750.c- Extension
.c- Size
- 29043 bytes
- Lines
- 1172
- Domain
- Driver Families
- Bucket
- drivers/staging
- 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.
- 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/kernel.hlinux/module.hlinux/errno.hlinux/string.hlinux/mm.hlinux/slab.hlinux/delay.hlinux/fb.hlinux/ioport.hlinux/init.hlinux/pci.hlinux/mm_types.hlinux/vmalloc.hlinux/pagemap.hlinux/console.hsm750.hsm750_accel.hsm750_cursor.h
Detected Declarations
function lynxfb_ops_cursorfunction lynxfb_ops_fillrectfunction lynxfb_ops_copyareafunction lynxfb_ops_imageblitfunction lynxfb_ops_pan_displayfunction lynxfb_set_visual_modefunction lynxfb_set_color_offsetsfunction lynxfb_ops_set_parfunction chan_to_fieldfunction lynxfb_suspendfunction lynxfb_resumefunction lynxfb_ops_check_varfunction lynxfb_ops_setcolregfunction lynxfb_ops_blankfunction sm750fb_set_drvfunction lynxfb_set_fbinfofunction sm750fb_setupfunction sm750fb_framebuffer_releasefunction sm750fb_framebuffer_allocfunction lynxfb_pci_probefunction lynxfb_pci_removefunction lynxfb_setupfunction strsepfunction lynxfb_initfunction lynxfb_exitmodule init lynxfb_init
Annotated Snippet
static struct pci_driver lynxfb_driver = {
.name = "sm750fb",
.id_table = smi_pci_table,
.probe = lynxfb_pci_probe,
.remove = lynxfb_pci_remove,
.driver.pm = &lynxfb_pm_ops,
};
static int __init lynxfb_init(void)
{
char *option;
if (fb_modesetting_disabled("sm750fb"))
return -ENODEV;
#ifdef MODULE
option = g_option;
#else
if (fb_get_options("sm750fb", &option))
return -ENODEV;
#endif
lynxfb_setup(option);
return pci_register_driver(&lynxfb_driver);
}
module_init(lynxfb_init);
static void __exit lynxfb_exit(void)
{
pci_unregister_driver(&lynxfb_driver);
}
module_exit(lynxfb_exit);
module_param(g_option, charp, 0444);
MODULE_PARM_DESC(g_option,
"\n\t\tCommon options:\n"
"\t\tnoaccel:disable 2d capabilities\n"
"\t\tnomtrr:disable MTRR attribute for video memory\n"
"\t\tdualview:dual frame buffer feature enabled\n"
"\t\tnohwc:disable hardware cursor\n"
"\t\tUsual example:\n"
"\t\tinsmod ./sm750fb.ko g_option=\"noaccel,nohwc,1280x1024-8@60\"\n"
);
MODULE_AUTHOR("monk liu <monk.liu@siliconmotion.com>");
MODULE_AUTHOR("Sudip Mukherjee <sudip@vectorindia.org>");
MODULE_DESCRIPTION("Frame buffer driver for SM750 chipset");
MODULE_LICENSE("Dual BSD/GPL");
Annotation
- Immediate include surface: `linux/aperture.h`, `linux/kernel.h`, `linux/module.h`, `linux/errno.h`, `linux/string.h`, `linux/mm.h`, `linux/slab.h`, `linux/delay.h`.
- Detected declarations: `function lynxfb_ops_cursor`, `function lynxfb_ops_fillrect`, `function lynxfb_ops_copyarea`, `function lynxfb_ops_imageblit`, `function lynxfb_ops_pan_display`, `function lynxfb_set_visual_mode`, `function lynxfb_set_color_offsets`, `function lynxfb_ops_set_par`, `function chan_to_field`, `function lynxfb_suspend`.
- Atlas domain: Driver Families / drivers/staging.
- 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.