#include <linux/module.h>
#include <linux/types.h>
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/console.h>
#include <linux/string.h>
#include <linux/kd.h>
#include <linux/slab.h>
#include <linux/vt_kern.h>
#include <linux/sched.h>
#include <linux/selection.h>
#include <linux/spinlock.h>
#include <linux/ioport.h>
#include <linux/init.h>
#include <linux/screen_info.h>
#include <video/vga.h>
#include <asm/io.h>
static DEFINE_RAW_SPINLOCK(vga_lock);
static int cursor_size_lastfrom;
static int cursor_size_lastto;
static u32 vgacon_xres;
static u32 vgacon_yres;
static struct vgastate vgastate;
#define BLANK …
#define VGA_FONTWIDTH …
static bool vgacon_set_origin(struct vc_data *c);
static struct uni_pagedict *vgacon_uni_pagedir;
static int vgacon_refcount;
static unsigned long vga_vram_base __read_mostly;
static unsigned long vga_vram_end __read_mostly;
static unsigned int vga_vram_size __read_mostly;
static u16 vga_video_port_reg __read_mostly;
static u16 vga_video_port_val __read_mostly;
static unsigned int vga_video_num_columns;
static unsigned int vga_video_num_lines;
static bool vga_can_do_color;
static unsigned int vga_default_font_height __read_mostly;
static unsigned char vga_video_type __read_mostly;
static enum vesa_blank_mode vga_vesa_blanked;
static bool vga_palette_blanked;
static bool vga_is_gfx;
static bool vga_512_chars;
static int vga_video_font_height;
static int vga_scan_lines __read_mostly;
static unsigned int vga_rolled_over;
static struct screen_info *vga_si;
static bool vga_hardscroll_enabled;
static bool vga_hardscroll_user_enable = …;
static int __init no_scroll(char *str)
{ … }
__setup(…);
static inline void write_vga(unsigned char reg, unsigned int val)
{ … }
static inline void vga_set_mem_top(struct vc_data *c)
{ … }
static void vgacon_scrolldelta(struct vc_data *c, int lines)
{ … }
static void vgacon_restore_screen(struct vc_data *c)
{ … }
static const char *vgacon_startup(void)
{ … }
static void vgacon_init(struct vc_data *c, bool init)
{ … }
static void vgacon_deinit(struct vc_data *c)
{ … }
static u8 vgacon_build_attr(struct vc_data *c, u8 color,
enum vc_intensity intensity,
bool blink, bool underline, bool reverse,
bool italic)
{ … }
static void vgacon_invert_region(struct vc_data *c, u16 * p, int count)
{ … }
static void vgacon_set_cursor_size(int from, int to)
{ … }
static void vgacon_cursor(struct vc_data *c, bool enable)
{ … }
static void vgacon_doresize(struct vc_data *c,
unsigned int width, unsigned int height)
{ … }
static bool vgacon_switch(struct vc_data *c)
{ … }
static void vga_set_palette(struct vc_data *vc, const unsigned char *table)
{ … }
static void vgacon_set_palette(struct vc_data *vc, const unsigned char *table)
{ … }
static struct { … } vga_state;
static void vga_vesa_blank(struct vgastate *state, enum vesa_blank_mode mode)
{ … }
static void vga_vesa_unblank(struct vgastate *state)
{ … }
static void vga_pal_blank(struct vgastate *state)
{ … }
static bool vgacon_blank(struct vc_data *c, enum vesa_blank_mode blank,
bool mode_switch)
{ … }
#define colourmap …
#define blackwmap …
#define cmapsz …
static int vgacon_do_font_op(struct vgastate *state, char *arg, int set,
bool ch512)
{ … }
static int vgacon_adjust_height(struct vc_data *vc, unsigned fontheight)
{ … }
static int vgacon_font_set(struct vc_data *c, const struct console_font *font,
unsigned int vpitch, unsigned int flags)
{ … }
static int vgacon_font_get(struct vc_data *c, struct console_font *font, unsigned int vpitch)
{ … }
static int vgacon_resize(struct vc_data *c, unsigned int width,
unsigned int height, bool from_user)
{ … }
static bool vgacon_set_origin(struct vc_data *c)
{ … }
static void vgacon_save_screen(struct vc_data *c)
{ … }
static bool vgacon_scroll(struct vc_data *c, unsigned int t, unsigned int b,
enum con_scroll dir, unsigned int lines)
{ … }
static void vgacon_clear(struct vc_data *vc, unsigned int sy, unsigned int sx,
unsigned int width) { … }
static void vgacon_putcs(struct vc_data *vc, const u16 *s, unsigned int count,
unsigned int ypos, unsigned int xpos) { … }
const struct consw vga_con = …;
EXPORT_SYMBOL(…);
void vgacon_register_screen(struct screen_info *si)
{ … }
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;