drivers/video/fbdev/aty/aty128fb.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/aty/aty128fb.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/aty/aty128fb.c- Extension
.c- Size
- 64093 bytes
- Lines
- 2484
- 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.
- 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
linux/aperture.hlinux/module.hlinux/moduleparam.hlinux/kernel.hlinux/errno.hlinux/string.hlinux/mm.hlinux/vmalloc.hlinux/delay.hlinux/interrupt.hlinux/uaccess.hlinux/fb.hlinux/init.hlinux/pci.hlinux/ioport.hlinux/console.hlinux/backlight.hasm/io.hasm/machdep.hasm/pmac_feature.h../macmodes.hasm/backlight.hasm/btext.hvideo/aty128.h
Detected Declarations
struct aty128_meminfostruct aty128_constantsstruct aty128_crtcstruct aty128_pllstruct aty128_ddafifostruct aty128fb_parfunction _aty_ld_le32function _aty_st_le32function _aty_ld_8function _aty_st_8function _aty_ld_pllfunction _aty_st_pllfunction aty_pll_readupdatefunction aty_pll_wait_readupdatefunction aty_pll_writeupdatefunction register_testfunction do_wait_for_fifofunction wait_for_idlefunction wait_for_fifofunction aty128_flush_pixel_cachefunction aty128_reset_enginefunction aty128_init_enginefunction depth_to_dstfunction aty128_get_pllinfofunction aty128_timingsfunction aty128_set_crtcfunction aty128_var_to_crtcfunction aty128_pix_width_to_varfunction aty128_crtc_to_varfunction aty128_set_crt_enablefunction aty128_set_lcd_enablefunction aty128_set_pllfunction aty128_var_to_pllfunction aty128_pll_to_varfunction aty128_set_fifofunction aty128_ddafifofunction aty128fb_set_parfunction aty128_decode_varfunction aty128_encode_varfunction aty128fb_check_varfunction aty128fb_pan_displayfunction aty128_st_palfunction aty128fb_syncfunction aty128fb_setupfunction aty128_bl_get_level_brightnessfunction aty128_bl_update_statusfunction aty128_bl_set_powerfunction aty128_bl_init
Annotated Snippet
static struct pci_driver aty128fb_driver = {
.name = "aty128fb",
.id_table = aty128_pci_tbl,
.probe = aty128_probe,
.remove = aty128_remove,
.driver.pm = &aty128_pci_pm_ops,
};
/* packed BIOS settings */
#ifndef CONFIG_PPC
typedef struct {
u8 clock_chip_type;
u8 struct_size;
u8 accelerator_entry;
u8 VGA_entry;
u16 VGA_table_offset;
u16 POST_table_offset;
u16 XCLK;
u16 MCLK;
u8 num_PLL_blocks;
u8 size_PLL_blocks;
u16 PCLK_ref_freq;
u16 PCLK_ref_divider;
u32 PCLK_min_freq;
u32 PCLK_max_freq;
u16 MCLK_ref_freq;
u16 MCLK_ref_divider;
u32 MCLK_min_freq;
u32 MCLK_max_freq;
u16 XCLK_ref_freq;
u16 XCLK_ref_divider;
u32 XCLK_min_freq;
u32 XCLK_max_freq;
} __attribute__ ((packed)) PLL_BLOCK;
#endif /* !CONFIG_PPC */
/* onboard memory information */
struct aty128_meminfo {
u8 ML;
u8 MB;
u8 Trcd;
u8 Trp;
u8 Twr;
u8 CL;
u8 Tr2w;
u8 LoopLatency;
u8 DspOn;
u8 Rloop;
const char *name;
};
/* various memory configurations */
static const struct aty128_meminfo sdr_128 = {
.ML = 4,
.MB = 4,
.Trcd = 3,
.Trp = 3,
.Twr = 1,
.CL = 3,
.Tr2w = 1,
.LoopLatency = 16,
.DspOn = 30,
.Rloop = 16,
.name = "128-bit SDR SGRAM (1:1)",
};
static const struct aty128_meminfo sdr_sgram = {
.ML = 4,
.MB = 4,
.Trcd = 1,
.Trp = 2,
.Twr = 1,
.CL = 2,
.Tr2w = 1,
.LoopLatency = 16,
.DspOn = 24,
.Rloop = 16,
.name = "64-bit SDR SGRAM (2:1)",
};
static const struct aty128_meminfo ddr_sgram = {
.ML = 4,
.MB = 4,
.Trcd = 3,
.Trp = 3,
.Twr = 2,
.CL = 3,
.Tr2w = 1,
.LoopLatency = 16,
.DspOn = 31,
Annotation
- Immediate include surface: `linux/aperture.h`, `linux/module.h`, `linux/moduleparam.h`, `linux/kernel.h`, `linux/errno.h`, `linux/string.h`, `linux/mm.h`, `linux/vmalloc.h`.
- Detected declarations: `struct aty128_meminfo`, `struct aty128_constants`, `struct aty128_crtc`, `struct aty128_pll`, `struct aty128_ddafifo`, `struct aty128fb_par`, `function _aty_ld_le32`, `function _aty_st_le32`, `function _aty_ld_8`, `function _aty_st_8`.
- 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.
- 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.