include/video/vga.h
Source file repositories/reference/linux-study-clean/include/video/vga.h
File Facts
- System
- Linux kernel
- Corpus path
include/video/vga.h- Extension
.h- Size
- 14946 bytes
- Lines
- 489
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/io.hasm/vga.hasm/byteorder.h
Detected Declarations
struct vgastatefunction vga_mm_rfunction vga_mm_wfunction vga_mm_w_fastfunction vga_io_rfunction vga_io_wfunction vga_io_w_fastfunction vga_rfunction vga_wfunction vga_w_fastfunction vga_rfunction vga_wfunction vga_w_fastfunction vga_rcrtfunction vga_wcrtfunction vga_io_rcrtfunction vga_io_wcrtfunction vga_mm_rcrtfunction vga_mm_wcrtfunction vga_rseqfunction vga_wseqfunction vga_io_rseqfunction vga_io_wseqfunction vga_mm_rseqfunction vga_mm_wseqfunction vga_rgfxfunction vga_wgfxfunction vga_io_rgfxfunction vga_io_wgfxfunction vga_mm_rgfxfunction vga_mm_wgfxfunction vga_rattrfunction vga_wattrfunction vga_io_rattrfunction vga_io_wattrfunction vga_mm_rattrfunction vga_mm_wattr
Annotated Snippet
struct vgastate {
void __iomem *vgabase; /* mmio base, if supported */
unsigned long membase; /* VGA window base, 0 for default - 0xA000 */
__u32 memsize; /* VGA window size, 0 for default 64K */
__u32 flags; /* what state[s] to save (see VGA_SAVE_*) */
__u32 depth; /* current fb depth, not important */
__u32 num_attr; /* number of att registers, 0 for default */
__u32 num_crtc; /* number of crt registers, 0 for default */
__u32 num_gfx; /* number of gfx registers, 0 for default */
__u32 num_seq; /* number of seq registers, 0 for default */
void *vidstate;
};
extern int save_vga(struct vgastate *state);
extern int restore_vga(struct vgastate *state);
static inline unsigned char vga_mm_r (void __iomem *regbase, unsigned short port)
{
return readb (regbase + port);
}
static inline void vga_mm_w (void __iomem *regbase, unsigned short port, unsigned char val)
{
writeb (val, regbase + port);
}
static inline void vga_mm_w_fast (void __iomem *regbase, unsigned short port,
unsigned char reg, unsigned char val)
{
writew (VGA_OUT16VAL (val, reg), regbase + port);
}
/*
* generic VGA port read/write
*/
#ifdef CONFIG_HAS_IOPORT
static inline unsigned char vga_io_r (unsigned short port)
{
return inb_p(port);
}
static inline void vga_io_w (unsigned short port, unsigned char val)
{
outb_p(val, port);
}
static inline void vga_io_w_fast (unsigned short port, unsigned char reg,
unsigned char val)
{
outw(VGA_OUT16VAL (val, reg), port);
}
static inline unsigned char vga_r (void __iomem *regbase, unsigned short port)
{
if (regbase)
return vga_mm_r (regbase, port);
else
return vga_io_r (port);
}
static inline void vga_w (void __iomem *regbase, unsigned short port, unsigned char val)
{
if (regbase)
vga_mm_w (regbase, port, val);
else
vga_io_w (port, val);
}
static inline void vga_w_fast (void __iomem *regbase, unsigned short port,
unsigned char reg, unsigned char val)
{
if (regbase)
vga_mm_w_fast (regbase, port, reg, val);
else
vga_io_w_fast (port, reg, val);
}
#else /* CONFIG_HAS_IOPORT */
static inline unsigned char vga_r (void __iomem *regbase, unsigned short port)
{
return vga_mm_r (regbase, port);
}
static inline void vga_w (void __iomem *regbase, unsigned short port, unsigned char val)
{
vga_mm_w (regbase, port, val);
}
Annotation
- Immediate include surface: `linux/types.h`, `linux/io.h`, `asm/vga.h`, `asm/byteorder.h`.
- Detected declarations: `struct vgastate`, `function vga_mm_r`, `function vga_mm_w`, `function vga_mm_w_fast`, `function vga_io_r`, `function vga_io_w`, `function vga_io_w_fast`, `function vga_r`, `function vga_w`, `function vga_w_fast`.
- Atlas domain: Repository Root And Misc / include.
- 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.