drivers/video/fbdev/tridentfb.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/tridentfb.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/tridentfb.c- Extension
.c- Size
- 44916 bytes
- Lines
- 1842
- 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/fb.hlinux/init.hlinux/pci.hlinux/slab.hlinux/delay.hvideo/vga.hvideo/trident.hlinux/i2c.hlinux/i2c-algo-bit.h
Detected Declarations
struct tridentfb_parfunction is_oldclockfunction is_oldprotectfunction is_bladefunction is_xpfunction is3Dchipfunction iscyberfunction t_outbfunction t_inbfunction writemmrfunction readmmrfunction tridentfb_ddc_setscl_tguifunction tridentfb_ddc_setsda_tguifunction tridentfb_ddc_getsda_tguifunction tridentfb_ddc_setsclfunction tridentfb_ddc_setsdafunction tridentfb_ddc_getsclfunction tridentfb_ddc_getsdafunction tridentfb_setup_ddc_busfunction blade_init_accelfunction blade_wait_enginefunction blade_fill_rectfunction blade_image_blitfunction blade_copy_rectfunction xp_init_accelfunction xp_wait_enginefunction xp_fill_rectfunction xp_copy_rectfunction image_init_accelfunction image_wait_enginefunction image_fill_rectfunction image_copy_rectfunction tgui_init_accelfunction tgui_fill_rectfunction tgui_copy_rectfunction tridentfb_fillrectfunction tridentfb_imageblitfunction tridentfb_copyareafunction tridentfb_syncfunction read3X4function write3X4function read3CEfunction writeAttrfunction write3CEfunction enable_mmiofunction disable_mmiofunction crtc_unlockfunction get_nativex
Annotated Snippet
static struct pci_driver tridentfb_pci_driver = {
.name = "tridentfb",
.id_table = trident_devices,
.probe = trident_pci_probe,
.remove = trident_pci_remove,
};
/*
* Parse user specified options (`video=trident:')
* example:
* video=trident:800x600,bpp=16,noaccel
*/
#ifndef MODULE
static int __init tridentfb_setup(char *options)
{
char *opt;
if (!options || !*options)
return 0;
while ((opt = strsep(&options, ",")) != NULL) {
if (!*opt)
continue;
if (!strncmp(opt, "noaccel", 7))
noaccel = 1;
else if (!strncmp(opt, "fp", 2))
fp = 1;
else if (!strncmp(opt, "crt", 3))
fp = 0;
else if (!strncmp(opt, "bpp=", 4))
bpp = simple_strtoul(opt + 4, NULL, 0);
else if (!strncmp(opt, "center", 6))
center = 1;
else if (!strncmp(opt, "stretch", 7))
stretch = 1;
else if (!strncmp(opt, "memsize=", 8))
memsize = simple_strtoul(opt + 8, NULL, 0);
else if (!strncmp(opt, "memdiff=", 8))
memdiff = simple_strtoul(opt + 8, NULL, 0);
else if (!strncmp(opt, "nativex=", 8))
nativex = simple_strtoul(opt + 8, NULL, 0);
else
mode_option = opt;
}
return 0;
}
#endif
static int __init tridentfb_init(void)
{
#ifndef MODULE
char *option = NULL;
#endif
if (fb_modesetting_disabled("tridentfb"))
return -ENODEV;
#ifndef MODULE
if (fb_get_options("tridentfb", &option))
return -ENODEV;
tridentfb_setup(option);
#endif
return pci_register_driver(&tridentfb_pci_driver);
}
static void __exit tridentfb_exit(void)
{
pci_unregister_driver(&tridentfb_pci_driver);
}
module_init(tridentfb_init);
module_exit(tridentfb_exit);
MODULE_AUTHOR("Jani Monoses <jani@iv.ro>");
MODULE_DESCRIPTION("Framebuffer driver for Trident cards");
MODULE_LICENSE("GPL");
MODULE_ALIAS("cyblafb");
Annotation
- Immediate include surface: `linux/aperture.h`, `linux/module.h`, `linux/fb.h`, `linux/init.h`, `linux/pci.h`, `linux/slab.h`, `linux/delay.h`, `video/vga.h`.
- Detected declarations: `struct tridentfb_par`, `function is_oldclock`, `function is_oldprotect`, `function is_blade`, `function is_xp`, `function is3Dchip`, `function iscyber`, `function t_outb`, `function t_inb`, `function writemmr`.
- 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.