drivers/video/fbdev/via/hw.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/via/hw.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/via/hw.c- Extension
.c- Size
- 59334 bytes
- Lines
- 2120
- Domain
- Driver Families
- Bucket
- drivers/video
- Inferred role
- Driver Families: implementation source
- Status
- source 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 or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/via-core.hglobal.hvia_clock.h
Detected Declarations
function viafb_lock_crtfunction viafb_unlock_crtfunction write_dac_regfunction get_dvi_devicesfunction get_lcd_devicesfunction viafb_set_iga_pathfunction set_color_registerfunction viafb_set_primary_color_registerfunction viafb_set_secondary_color_registerfunction set_source_commonfunction set_crt_sourcefunction set_ldvp0_sourcefunction set_ldvp1_sourcefunction set_dvp0_sourcefunction set_dvp1_sourcefunction set_lvds1_sourcefunction set_lvds2_sourcefunction via_set_sourcefunction set_crt_statefunction set_dvp0_statefunction set_dvp1_statefunction set_lvds1_statefunction set_lvds2_statefunction via_set_statefunction via_set_sync_polarityfunction via_parse_odevfunction via_odev_to_seqfunction load_fix_bit_crtc_regfunction viafb_load_regfunction viafb_write_regxfunction viafb_load_fetch_count_regfunction viafb_load_FIFO_regfunction get_pll_configfunction get_best_pll_configfunction viafb_set_vclockfunction var_to_timingfunction viafb_fill_crtc_timingfunction viafb_init_chip_infofunction viafb_update_device_settingfunction init_gfx_chip_infofunction init_tmds_chip_infofunction init_lvds_chip_infofunction viafb_init_dacfunction device_screen_offfunction device_screen_onfunction set_display_channelfunction get_syncfunction hw_init
Annotated Snippet
if (viafb_CRT_ON) {
if (viafb_primary_dev == CRT_Device)
crt_iga_path = IGA1;
else
crt_iga_path = IGA2;
}
if (viafb_DVI_ON) {
if (viafb_primary_dev == DVI_Device)
viaparinfo->tmds_setting_info->iga_path = IGA1;
else
viaparinfo->tmds_setting_info->iga_path = IGA2;
}
if (viafb_LCD_ON) {
if (viafb_primary_dev == LCD_Device) {
if (viafb_dual_fb &&
(viaparinfo->chip_info->gfx_chip_name ==
UNICHROME_CLE266)) {
viaparinfo->
lvds_setting_info->iga_path = IGA2;
crt_iga_path = IGA1;
viaparinfo->
tmds_setting_info->iga_path = IGA1;
} else
viaparinfo->
lvds_setting_info->iga_path = IGA1;
} else {
viaparinfo->lvds_setting_info->iga_path = IGA2;
}
}
if (viafb_LCD2_ON) {
if (LCD2_Device == viafb_primary_dev)
viaparinfo->lvds_setting_info2->iga_path = IGA1;
else
viaparinfo->lvds_setting_info2->iga_path = IGA2;
}
} else {
viafb_SAMM_ON = 0;
if (viafb_CRT_ON && viafb_LCD_ON) {
crt_iga_path = IGA1;
viaparinfo->lvds_setting_info->iga_path = IGA2;
} else if (viafb_CRT_ON && viafb_DVI_ON) {
crt_iga_path = IGA1;
viaparinfo->tmds_setting_info->iga_path = IGA2;
} else if (viafb_LCD_ON && viafb_DVI_ON) {
viaparinfo->tmds_setting_info->iga_path = IGA1;
viaparinfo->lvds_setting_info->iga_path = IGA2;
} else if (viafb_LCD_ON && viafb_LCD2_ON) {
viaparinfo->lvds_setting_info->iga_path = IGA2;
viaparinfo->lvds_setting_info2->iga_path = IGA2;
} else if (viafb_CRT_ON) {
crt_iga_path = IGA1;
} else if (viafb_LCD_ON) {
viaparinfo->lvds_setting_info->iga_path = IGA2;
} else if (viafb_DVI_ON) {
viaparinfo->tmds_setting_info->iga_path = IGA1;
}
}
viaparinfo->shared->iga1_devices = 0;
viaparinfo->shared->iga2_devices = 0;
if (viafb_CRT_ON) {
if (crt_iga_path == IGA1)
viaparinfo->shared->iga1_devices |= VIA_CRT;
else
viaparinfo->shared->iga2_devices |= VIA_CRT;
}
if (viafb_DVI_ON) {
if (viaparinfo->tmds_setting_info->iga_path == IGA1)
viaparinfo->shared->iga1_devices |= get_dvi_devices(
viaparinfo->chip_info->
tmds_chip_info.output_interface);
else
viaparinfo->shared->iga2_devices |= get_dvi_devices(
viaparinfo->chip_info->
tmds_chip_info.output_interface);
}
if (viafb_LCD_ON) {
if (viaparinfo->lvds_setting_info->iga_path == IGA1)
viaparinfo->shared->iga1_devices |= get_lcd_devices(
viaparinfo->chip_info->
lvds_chip_info.output_interface);
else
viaparinfo->shared->iga2_devices |= get_lcd_devices(
viaparinfo->chip_info->
lvds_chip_info.output_interface);
Annotation
- Immediate include surface: `linux/via-core.h`, `global.h`, `via_clock.h`.
- Detected declarations: `function viafb_lock_crt`, `function viafb_unlock_crt`, `function write_dac_reg`, `function get_dvi_devices`, `function get_lcd_devices`, `function viafb_set_iga_path`, `function set_color_register`, `function viafb_set_primary_color_register`, `function viafb_set_secondary_color_register`, `function set_source_common`.
- Atlas domain: Driver Families / drivers/video.
- Implementation status: source 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.