drivers/video/fbdev/core/fbcon.h
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/core/fbcon.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/core/fbcon.h- Extension
.h- Size
- 9029 bytes
- Lines
- 287
- 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/compiler_types.hlinux/font.hlinux/types.hlinux/vt_buffer.hlinux/vt_kern.hlinux/workqueue.hasm/io.h
Detected Declarations
struct fb_blit_capsstruct fb_infostruct fb_var_screeninfostruct fb_videomodestruct fbcon_displaystruct fbcon_bitopsstruct fbcon_parfunction mono_colfunction placefunction real_yfunction get_attributefunction fb_console_initfunction fbcon_fb_unregisteredfunction fbcon_delete_modelistfunction fbcon_update_vcsfunction fbcon_get_con2fb_map_ioctl
Annotated Snippet
struct fbcon_display {
/* Filled in by the low-level console driver */
font_data_t *fontdata;
#ifdef CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION
u_short scrollmode; /* Scroll Method, use fb_scrollmode() */
#endif
short yscroll; /* Hardware scrolling */
int vrows; /* number of virtual rows */
int cursor_shape;
int con_rotate;
u32 xres_virtual;
u32 yres_virtual;
u32 height;
u32 width;
u32 bits_per_pixel;
u32 grayscale;
u32 nonstd;
u32 accel_flags;
u32 rotate;
struct fb_bitfield red;
struct fb_bitfield green;
struct fb_bitfield blue;
struct fb_bitfield transp;
const struct fb_videomode *mode;
};
struct fbcon_bitops {
void (*bmove)(struct vc_data *vc, struct fb_info *info, int sy,
int sx, int dy, int dx, int height, int width);
void (*clear)(struct vc_data *vc, struct fb_info *info, int sy,
int sx, int height, int width, int fb, int bg);
void (*putcs)(struct vc_data *vc, struct fb_info *info,
const unsigned short *s, int count, int yy, int xx,
int fg, int bg);
void (*clear_margins)(struct vc_data *vc, struct fb_info *info,
int color, int bottom_only);
void (*cursor)(struct vc_data *vc, struct fb_info *info,
bool enable, int fg, int bg);
int (*update_start)(struct fb_info *info);
int (*rotate_font)(struct fb_info *info, struct vc_data *vc);
};
struct fbcon_par {
struct fb_var_screeninfo var; /* copy of the current fb_var_screeninfo */
struct delayed_work cursor_work; /* Cursor timer */
struct fb_cursor cursor_state;
struct fbcon_display *p;
struct fb_info *info;
int currcon; /* Current VC. */
int cur_blink_jiffies;
int cursor_flash;
int cursor_reset;
int blank_state;
int graphics;
bool initialized;
int rotate;
char *cursor_data;
#ifdef CONFIG_FRAMEBUFFER_CONSOLE_ROTATION
struct {
font_data_t *fontdata; /* source font */
u8 *buf; /* rotated glyphs */
size_t bufsize;
int buf_rotate; /* rotation of buf */
} rotated;
#endif
u8 *cursor_src;
u32 cursor_size;
const struct fbcon_bitops *bitops;
};
/*
* Attribute Decoding
*/
/* Color */
#define attr_fgcol(fgshift,s) \
(((s) >> (fgshift)) & 0x0f)
#define attr_bgcol(bgshift,s) \
(((s) >> (bgshift)) & 0x0f)
/* Monochrome */
#define attr_bold(s) \
((s) & 0x200)
#define attr_reverse(s) \
((s) & 0x800)
#define attr_underline(s) \
((s) & 0x400)
#define attr_blink(s) \
((s) & 0x8000)
Annotation
- Immediate include surface: `linux/compiler_types.h`, `linux/font.h`, `linux/types.h`, `linux/vt_buffer.h`, `linux/vt_kern.h`, `linux/workqueue.h`, `asm/io.h`.
- Detected declarations: `struct fb_blit_caps`, `struct fb_info`, `struct fb_var_screeninfo`, `struct fb_videomode`, `struct fbcon_display`, `struct fbcon_bitops`, `struct fbcon_par`, `function mono_col`, `function place`, `function real_y`.
- 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.