drivers/video/fbdev/aty/radeon_base.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/aty/radeon_base.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/aty/radeon_base.c- Extension
.c- Size
- 78340 bytes
- Lines
- 2656
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- 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
radeonfb.hlinux/aperture.hlinux/module.hlinux/moduleparam.hlinux/kernel.hlinux/errno.hlinux/string.hlinux/ctype.hlinux/mm.hlinux/slab.hlinux/delay.hlinux/time.hlinux/fb.hlinux/ioport.hlinux/init.hlinux/pci.hlinux/vmalloc.hlinux/device.hasm/io.hlinux/uaccess.h../macmodes.hasm/btext.hvideo/radeon.hlinux/radeonfb.h../edid.hati_ids.h
Detected Declarations
function chipfunction radeon_pll_errata_after_index_slowfunction radeon_pll_errata_after_data_slowfunction _OUTREGPfunction __INPLLfunction __OUTPLLfunction __OUTPLLPfunction _radeon_fifo_waitfunction radeon_engine_flushfunction _radeon_engine_idlefunction radeon_unmap_ROMfunction radeon_map_ROMfunction radeon_find_mem_vbiosfunction XTALfunction radeon_probe_pll_paramsfunction meansfunction radeonfb_check_varfunction radeonfb_pan_displayfunction radeonfb_ioctlfunction radeon_screen_blankfunction radeonfb_blankfunction radeon_setcolregfunction radeonfb_setcolregfunction radeonfb_setcmapfunction radeon_save_statefunction radeon_write_pll_regsfunction radeon_lvds_timer_funcfunction radeon_write_modefunction radeon_calc_pll_regsfunction rfunction radeonfb_set_parfunction radeon_set_fbinfofunction localfunction radeon_identify_vramfunction radeon_show_one_edidfunction radeon_show_edid1function radeon_show_edid2function radeonfb_pci_registerfunction radeonfb_pci_unregisterfunction radeonfb_setupfunction radeonfb_initfunction radeonfb_exitmodule init radeonfb_init
Annotated Snippet
static struct pci_driver radeonfb_driver = {
.name = "radeonfb",
.id_table = radeonfb_pci_table,
.probe = radeonfb_pci_register,
.remove = radeonfb_pci_unregister,
.driver.pm = RADEONFB_PCI_PM_OPS,
};
#ifndef MODULE
static int __init radeonfb_setup (char *options)
{
char *this_opt;
if (!options || !*options)
return 0;
while ((this_opt = strsep (&options, ",")) != NULL) {
if (!*this_opt)
continue;
if (!strncmp(this_opt, "noaccel", 7)) {
noaccel = 1;
} else if (!strncmp(this_opt, "mirror", 6)) {
mirror = 1;
} else if (!strncmp(this_opt, "force_dfp", 9)) {
force_dfp = 1;
} else if (!strncmp(this_opt, "panel_yres:", 11)) {
panel_yres = simple_strtoul((this_opt+11), NULL, 0);
} else if (!strncmp(this_opt, "backlight:", 10)) {
backlight = simple_strtoul(this_opt+10, NULL, 0);
} else if (!strncmp(this_opt, "nomtrr", 6)) {
nomtrr = 1;
} else if (!strncmp(this_opt, "nomodeset", 9)) {
nomodeset = 1;
} else if (!strncmp(this_opt, "force_measure_pll", 17)) {
force_measure_pll = 1;
} else if (!strncmp(this_opt, "ignore_edid", 11)) {
ignore_edid = 1;
#if defined(CONFIG_PM) && defined(CONFIG_X86)
} else if (!strncmp(this_opt, "force_sleep", 11)) {
force_sleep = 1;
} else if (!strncmp(this_opt, "ignore_devlist", 14)) {
ignore_devlist = 1;
#endif
} else
mode_option = this_opt;
}
return 0;
}
#endif /* MODULE */
static int __init radeonfb_init (void)
{
#ifndef MODULE
char *option = NULL;
#endif
if (fb_modesetting_disabled("radeonfb"))
return -ENODEV;
#ifndef MODULE
if (fb_get_options("radeonfb", &option))
return -ENODEV;
radeonfb_setup(option);
#endif
return pci_register_driver (&radeonfb_driver);
}
static void __exit radeonfb_exit (void)
{
pci_unregister_driver (&radeonfb_driver);
}
module_init(radeonfb_init);
module_exit(radeonfb_exit);
MODULE_AUTHOR("Ani Joshi");
MODULE_DESCRIPTION("framebuffer driver for ATI Radeon chipset");
MODULE_LICENSE("GPL");
module_param(noaccel, bool, 0);
module_param(default_dynclk, int, 0);
MODULE_PARM_DESC(default_dynclk, "int: -2=enable on mobility only,-1=do not change,0=off,1=on");
MODULE_PARM_DESC(noaccel, "bool: disable acceleration");
module_param(nomodeset, bool, 0);
MODULE_PARM_DESC(nomodeset, "bool: disable actual setting of video mode");
module_param(mirror, bool, 0);
MODULE_PARM_DESC(mirror, "bool: mirror the display to both monitors");
module_param(force_dfp, bool, 0);
MODULE_PARM_DESC(force_dfp, "bool: force display to dfp");
Annotation
- Immediate include surface: `radeonfb.h`, `linux/aperture.h`, `linux/module.h`, `linux/moduleparam.h`, `linux/kernel.h`, `linux/errno.h`, `linux/string.h`, `linux/ctype.h`.
- Detected declarations: `function chip`, `function radeon_pll_errata_after_index_slow`, `function radeon_pll_errata_after_data_slow`, `function _OUTREGP`, `function __INPLL`, `function __OUTPLL`, `function __OUTPLLP`, `function _radeon_fifo_wait`, `function radeon_engine_flush`, `function _radeon_engine_idle`.
- 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.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.