drivers/video/fbdev/geode/lxfb_ops.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/geode/lxfb_ops.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/geode/lxfb_ops.c- Extension
.c- Size
- 20788 bytes
- Lines
- 840
- 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/kernel.hlinux/errno.hlinux/fb.hlinux/uaccess.hlinux/delay.hlinux/cs5535.hasm/msr.hlxfb.h
Detected Declarations
function lx_set_dotpllfunction lx_set_clockfunction lx_graphics_disablefunction lx_graphics_enablefunction lx_framebuffer_sizefunction lx_set_modefunction lx_set_palette_regfunction lx_blank_displayfunction lx_save_regsfunction lx_restore_gfx_procfunction lx_restore_display_ctlrfunction lx_restore_video_procfunction lx_restore_regsfunction lx_powerdownfunction lx_powerup
Annotated Snippet
if (diff < min) {
min = diff;
best = i;
}
}
lx_set_dotpll(pll_table[best].pllval & 0x00017FFF);
}
static void lx_graphics_disable(struct fb_info *info)
{
struct lxfb_par *par = info->par;
unsigned int val, gcfg;
/* Note: This assumes that the video is in a quitet state */
write_vp(par, VP_A1T, 0);
write_vp(par, VP_A2T, 0);
write_vp(par, VP_A3T, 0);
/* Turn off the VGA and video enable */
val = read_dc(par, DC_GENERAL_CFG) & ~(DC_GENERAL_CFG_VGAE |
DC_GENERAL_CFG_VIDE);
write_dc(par, DC_GENERAL_CFG, val);
val = read_vp(par, VP_VCFG) & ~VP_VCFG_VID_EN;
write_vp(par, VP_VCFG, val);
write_dc(par, DC_IRQ, DC_IRQ_MASK | DC_IRQ_VIP_VSYNC_LOSS_IRQ_MASK |
DC_IRQ_STATUS | DC_IRQ_VIP_VSYNC_IRQ_STATUS);
val = read_dc(par, DC_GENLK_CTL) & ~DC_GENLK_CTL_GENLK_EN;
write_dc(par, DC_GENLK_CTL, val);
val = read_dc(par, DC_CLR_KEY);
write_dc(par, DC_CLR_KEY, val & ~DC_CLR_KEY_CLR_KEY_EN);
/* turn off the panel */
write_fp(par, FP_PM, read_fp(par, FP_PM) & ~FP_PM_P);
val = read_vp(par, VP_MISC) | VP_MISC_DACPWRDN;
write_vp(par, VP_MISC, val);
/* Turn off the display */
val = read_vp(par, VP_DCFG);
write_vp(par, VP_DCFG, val & ~(VP_DCFG_CRT_EN | VP_DCFG_HSYNC_EN |
VP_DCFG_VSYNC_EN | VP_DCFG_DAC_BL_EN));
gcfg = read_dc(par, DC_GENERAL_CFG);
gcfg &= ~(DC_GENERAL_CFG_CMPE | DC_GENERAL_CFG_DECE);
write_dc(par, DC_GENERAL_CFG, gcfg);
/* Turn off the TGEN */
val = read_dc(par, DC_DISPLAY_CFG);
val &= ~DC_DISPLAY_CFG_TGEN;
write_dc(par, DC_DISPLAY_CFG, val);
/* Wait 1000 usecs to ensure that the TGEN is clear */
udelay(1000);
/* Turn off the FIFO loader */
gcfg &= ~DC_GENERAL_CFG_DFLE;
write_dc(par, DC_GENERAL_CFG, gcfg);
/* Lastly, wait for the GP to go idle */
do {
val = read_gp(par, GP_BLT_STATUS);
} while ((val & GP_BLT_STATUS_PB) || !(val & GP_BLT_STATUS_CE));
}
static void lx_graphics_enable(struct fb_info *info)
{
struct lxfb_par *par = info->par;
u32 temp, config;
/* Set the video request register */
write_vp(par, VP_VRR, 0);
/* Set up the polarities */
config = read_vp(par, VP_DCFG);
config &= ~(VP_DCFG_CRT_SYNC_SKW | VP_DCFG_PWR_SEQ_DELAY |
VP_DCFG_CRT_HSYNC_POL | VP_DCFG_CRT_VSYNC_POL);
config |= (VP_DCFG_CRT_SYNC_SKW_DEFAULT | VP_DCFG_PWR_SEQ_DELAY_DEFAULT
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/errno.h`, `linux/fb.h`, `linux/uaccess.h`, `linux/delay.h`, `linux/cs5535.h`, `asm/msr.h`, `lxfb.h`.
- Detected declarations: `function lx_set_dotpll`, `function lx_set_clock`, `function lx_graphics_disable`, `function lx_graphics_enable`, `function lx_framebuffer_size`, `function lx_set_mode`, `function lx_set_palette_reg`, `function lx_blank_display`, `function lx_save_regs`, `function lx_restore_gfx_proc`.
- 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.