drivers/video/fbdev/riva/fbdev.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/riva/fbdev.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/riva/fbdev.c- Extension
.c- Size
- 57713 bytes
- Lines
- 2158
- 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.
- 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/init.hlinux/pci.hlinux/backlight.hlinux/bitrev.hasm/machdep.hasm/backlight.hrivafb.hnvreg.h
Detected Declarations
function riva_bl_get_level_brightnessfunction riva_bl_update_statusfunction riva_bl_initfunction riva_bl_exitfunction riva_bl_initfunction CRTCinfunction GRAoutfunction GRAinfunction SEQoutfunction SEQinfunction ATTRoutfunction ATTRinfunction MISCoutfunction MISCinfunction reverse_orderfunction rivafb_cursorfunction rivafb_setcolregfunction rivafb_setcolregfunction rivafb_probefunction riva_load_video_modefunction riva_load_statefunction riva_update_varfunction rivafb_check_varfunction riva_set_patternfunction wait_for_idlefunction riva_set_rop_solidfunction riva_setup_accelfunction rivafb_setcolregfunction rivafb_openfunction rivafb_releasefunction rivafb_check_varfunction rivafb_set_parfunction Panfunction rivafb_blankfunction rivafb_setcolregfunction rivafb_fillrectfunction rivafb_copyareafunction convert_bgcolor_16function rivafb_imageblitfunction rivafb_cursorfunction rivafb_syncfunction riva_set_fbinfofunction riva_get_EDID_OFfunction riva_get_EDID_i2cfunction riva_update_default_varfunction riva_get_EDIDfunction riva_get_edidinfofunction riva_get_arch
Annotated Snippet
static struct pci_driver rivafb_driver = {
.name = "rivafb",
.id_table = rivafb_pci_tbl,
.probe = rivafb_probe,
.remove = rivafb_remove,
};
/* ------------------------------------------------------------------------- *
*
* modularization
*
* ------------------------------------------------------------------------- */
static int rivafb_init(void)
{
#ifndef MODULE
char *option = NULL;
#endif
if (fb_modesetting_disabled("rivafb"))
return -ENODEV;
#ifndef MODULE
if (fb_get_options("rivafb", &option))
return -ENODEV;
rivafb_setup(option);
#endif
return pci_register_driver(&rivafb_driver);
}
module_init(rivafb_init);
static void __exit rivafb_exit(void)
{
pci_unregister_driver(&rivafb_driver);
}
module_exit(rivafb_exit);
module_param(noaccel, bool, 0);
MODULE_PARM_DESC(noaccel, "bool: disable acceleration");
module_param(flatpanel, int, 0);
MODULE_PARM_DESC(flatpanel, "Enables experimental flat panel support for some chipsets. (0 or 1=enabled) (default=0)");
module_param(forceCRTC, int, 0);
MODULE_PARM_DESC(forceCRTC, "Forces usage of a particular CRTC in case autodetection fails. (0 or 1) (default=autodetect)");
module_param(nomtrr, bool, 0);
MODULE_PARM_DESC(nomtrr, "Disables MTRR support (0 or 1=disabled) (default=0)");
module_param(strictmode, bool, 0);
MODULE_PARM_DESC(strictmode, "Only use video modes from EDID");
MODULE_AUTHOR("Ani Joshi, maintainer");
MODULE_DESCRIPTION("Framebuffer driver for nVidia Riva 128, TNT, TNT2, and the GeForce series");
MODULE_LICENSE("GPL");
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 riva_bl_get_level_brightness`, `function riva_bl_update_status`, `function riva_bl_init`, `function riva_bl_exit`, `function riva_bl_init`, `function CRTCin`, `function GRAout`, `function GRAin`, `function SEQout`, `function SEQin`.
- 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.