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.

Dependency Surface

Detected Declarations

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

Implementation Notes