cregit-Linux how code gets into the kernel

Release 4.14 drivers/video/console/vgacon.c

/*
 *  linux/drivers/video/vgacon.c -- Low level VGA based console driver
 *
 *      Created 28 Sep 1997 by Geert Uytterhoeven
 *
 *      Rewritten by Martin Mares <mj@ucw.cz>, July 1998
 *
 *  This file is based on the old console.c, vga.c and vesa_blank.c drivers.
 *
 *      Copyright (C) 1991, 1992  Linus Torvalds
 *                          1995  Jay Estabrook
 *
 *      User definable mapping table and font loading by Eugene G. Crosser,
 *      <crosser@average.org>
 *
 *      Improved loadable font/UTF-8 support by H. Peter Anvin
 *      Feb-Sep 1995 <peter.anvin@linux.org>
 *
 *      Colour palette handling, by Simon Tatham
 *      17-Jun-95 <sgt20@cam.ac.uk>
 *
 *      if 512 char mode is already enabled don't re-enable it,
 *      because it causes screen to flicker, by Mitja Horvat
 *      5-May-96 <mitja.horvat@guest.arnes.si>
 *
 *      Use 2 outw instead of 4 outb_p to reduce erroneous text
 *      flashing on RHS of screen during heavy console scrolling .
 *      Oct 1996, Paul Gortmaker.
 *
 *
 *  This file is subject to the terms and conditions of the GNU General Public
 *  License.  See the file COPYING in the main directory of this archive for
 *  more details.
 */

#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 0x0020


#define VGA_FONTWIDTH       8   
/* VGA does not support fontwidths != 8 */
/*
 *  Interface used by the world
 */

static const char *vgacon_startup(void);
static void vgacon_init(struct vc_data *c, int init);
static void vgacon_deinit(struct vc_data *c);
static void vgacon_cursor(struct vc_data *c, int mode);
static int vgacon_switch(struct vc_data *c);
static int vgacon_blank(struct vc_data *c, int blank, int mode_switch);
static void vgacon_scrolldelta(struct vc_data *c, int lines);
static int vgacon_set_origin(struct vc_data *c);
static void vgacon_save_screen(struct vc_data *c);
static void vgacon_invert_region(struct vc_data *c, u16 * p, int count);

static struct uni_pagedir *vgacon_uni_pagedir;

static int vgacon_refcount;

/* Description of the hardware situation */

static bool		vga_init_done;

static unsigned long	vga_vram_base		__read_mostly;	
/* Base of video memory */

static unsigned long	vga_vram_end		__read_mostly;	
/* End of video memory */

static unsigned int	vga_vram_size		__read_mostly;	
/* Size of video memory */

static u16		vga_video_port_reg	__read_mostly;	
/* Video register select port */

static u16		vga_video_port_val	__read_mostly;	
/* Video register value port */

static unsigned int	vga_video_num_columns;			
/* Number of text columns */

static unsigned int	vga_video_num_lines;			
/* Number of text lines */

static bool		vga_can_do_color;			
/* Do we support colors? */

static unsigned int	vga_default_font_height __read_mostly;	
/* Height of default screen font */

static unsigned char	vga_video_type		__read_mostly;	
/* Card type */

static bool		vga_font_is_default = true;

static int		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 bool vgacon_text_mode_force;

static bool vga_hardscroll_enabled;

static bool vga_hardscroll_user_enable = true;


bool vgacon_text_force(void) { return vgacon_text_mode_force; }

Contributors

PersonTokensPropCommitsCommitProp
Dave Airlie10100.00%1100.00%
Total10100.00%1100.00%

EXPORT_SYMBOL(vgacon_text_force);
static int __init text_mode(char *str) { vgacon_text_mode_force = true; return 1; }

Contributors

PersonTokensPropCommitsCommitProp
Dave Airlie1794.44%150.00%
Jiri Slaby15.56%150.00%
Total18100.00%2100.00%

/* force text mode - used by kernel modesetting */ __setup("nomodeset", text_mode);
static int __init no_scroll(char *str) { /* * Disabling scrollback is required for the Braillex ib80-piezo * Braille reader made by F.H. Papenmeier (Germany). * Use the "no-scroll" bootflag. */ vga_hardscroll_user_enable = vga_hardscroll_enabled = false; return 1; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)2095.24%375.00%
Jiri Slaby14.76%125.00%
Total21100.00%4100.00%

__setup("no-scroll", no_scroll); /* * By replacing the four outb_p with two back to back outw, we can reduce * the window of opportunity to see text mislocated to the RHS of the * console during heavy scrolling activity. However there is the remote * possibility that some pre-dinosaur hardware won't like the back to back * I/O. Since the Xservers get away with it, we should be able to as well. */
static inline void write_vga(unsigned char reg, unsigned int val) { unsigned int v1, v2; unsigned long flags; /* * ddprintk might set the console position from interrupt * handlers, thus the write has to be IRQ-atomic. */ raw_spin_lock_irqsave(&vga_lock, flags); v1 = reg + (val & 0xff00); v2 = reg + 1 + ((val << 8) & 0xff00); outw(v1, vga_video_port_reg); outw(v2, vga_video_port_reg); raw_spin_unlock_irqrestore(&vga_lock, flags); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)8097.56%375.00%
Thomas Gleixner22.44%125.00%
Total82100.00%4100.00%


static inline void vga_set_mem_top(struct vc_data *c) { write_vga(12, (c->vc_visible_origin - vga_vram_base) / 2); }

Contributors

PersonTokensPropCommitsCommitProp
Antonino A. Daplas27100.00%1100.00%
Total27100.00%1100.00%

#ifdef CONFIG_VGACON_SOFT_SCROLLBACK /* software scrollback */ struct vgacon_scrollback_info { void *data; int tail; int size; int rows; int cnt; int cur; int save; int restore; }; static struct vgacon_scrollback_info *vgacon_scrollback_cur; static struct vgacon_scrollback_info vgacon_scrollbacks[MAX_NR_CONSOLES]; static bool scrollback_persistent = \ IS_ENABLED(CONFIG_VGACON_SOFT_SCROLLBACK_PERSISTENT_ENABLE_BY_DEFAULT); module_param_named(scrollback_persistent, scrollback_persistent, bool, 0000); MODULE_PARM_DESC(scrollback_persistent, "Enable persistent scrollback for all vga consoles");
static void vgacon_scrollback_reset(int vc_num, size_t reset_size) { struct vgacon_scrollback_info *scrollback = &vgacon_scrollbacks[vc_num]; if (scrollback->data && reset_size > 0) memset(scrollback->data, 0, reset_size); scrollback->cnt = 0; scrollback->tail = 0; scrollback->cur = 0; }

Contributors

PersonTokensPropCommitsCommitProp
Manuel Schölling62100.00%2100.00%
Total62100.00%2100.00%


static void vgacon_scrollback_init(int vc_num) { int pitch = vga_video_num_columns * 2; size_t size = CONFIG_VGACON_SOFT_SCROLLBACK_SIZE * 1024; int rows = size / pitch; void *data; data = kmalloc_array(CONFIG_VGACON_SOFT_SCROLLBACK_SIZE, 1024, GFP_NOWAIT); vgacon_scrollbacks[vc_num].data = data; vgacon_scrollback_cur = &vgacon_scrollbacks[vc_num]; vgacon_scrollback_cur->rows = rows - 1; vgacon_scrollback_cur->size = rows * pitch; vgacon_scrollback_reset(vc_num, size); }

Contributors

PersonTokensPropCommitsCommitProp
Manuel Schölling5362.35%266.67%
Antonino A. Daplas3237.65%133.33%
Total85100.00%3100.00%


static void vgacon_scrollback_switch(int vc_num) { if (!scrollback_persistent) vc_num = 0; if (!vgacon_scrollbacks[vc_num].data) { vgacon_scrollback_init(vc_num); } else { if (scrollback_persistent) { vgacon_scrollback_cur = &vgacon_scrollbacks[vc_num]; } else { size_t size = CONFIG_VGACON_SOFT_SCROLLBACK_SIZE * 1024; vgacon_scrollback_reset(vc_num, size); } } }

Contributors

PersonTokensPropCommitsCommitProp
Manuel Schölling5884.06%360.00%
Antonino A. Daplas1014.49%120.00%
Pekka J Enberg11.45%120.00%
Total69100.00%5100.00%


static void vgacon_scrollback_startup(void) { vgacon_scrollback_cur = &vgacon_scrollbacks[0]; vgacon_scrollback_init(0); }

Contributors

PersonTokensPropCommitsCommitProp
Manuel Schölling1676.19%150.00%
Antonino A. Daplas523.81%150.00%
Total21100.00%2100.00%


static void vgacon_scrollback_update(struct vc_data *c, int t, int count) { void *p; if (!vgacon_scrollback_cur->data || !vgacon_scrollback_cur->size || c->vc_num != fg_console) return; p = (void *) (c->vc_origin + t * c->vc_size_row); while (count--) { scr_memcpyw(vgacon_scrollback_cur->data + vgacon_scrollback_cur->tail, p, c->vc_size_row); vgacon_scrollback_cur->cnt++; p += c->vc_size_row; vgacon_scrollback_cur->tail += c->vc_size_row; if (vgacon_scrollback_cur->tail >= vgacon_scrollback_cur->size) vgacon_scrollback_cur->tail = 0; if (vgacon_scrollback_cur->cnt > vgacon_scrollback_cur->rows) vgacon_scrollback_cur->cnt = vgacon_scrollback_cur->rows; vgacon_scrollback_cur->cur = vgacon_scrollback_cur->cnt; } }

Contributors

PersonTokensPropCommitsCommitProp
Antonino A. Daplas9667.13%133.33%
Manuel Schölling4732.87%266.67%
Total143100.00%3100.00%


static void vgacon_restore_screen(struct vc_data *c) { vgacon_scrollback_cur->save = 0; if (!vga_is_gfx && !vgacon_scrollback_cur->restore) { scr_memcpyw((u16 *) c->vc_origin, (u16 *) c->vc_screenbuf, c->vc_screenbuf_size > vga_vram_size ? vga_vram_size : c->vc_screenbuf_size); vgacon_scrollback_cur->restore = 1; vgacon_scrollback_cur->cur = vgacon_scrollback_cur->cnt; } }

Contributors

PersonTokensPropCommitsCommitProp
Antonino A. Daplas5979.73%133.33%
Manuel Schölling1520.27%266.67%
Total74100.00%3100.00%


static void vgacon_scrolldelta(struct vc_data *c, int lines) { int start, end, count, soff; if (!lines) { c->vc_visible_origin = c->vc_origin; vga_set_mem_top(c); return; } if (!vgacon_scrollback_cur->data) return; if (!vgacon_scrollback_cur->save) { vgacon_cursor(c, CM_ERASE); vgacon_save_screen(c); vgacon_scrollback_cur->save = 1; } vgacon_scrollback_cur->restore = 0; start = vgacon_scrollback_cur->cur + lines; end = start + abs(lines); if (start < 0) start = 0; if (start > vgacon_scrollback_cur->cnt) start = vgacon_scrollback_cur->cnt; if (end < 0) end = 0; if (end > vgacon_scrollback_cur->cnt) end = vgacon_scrollback_cur->cnt; vgacon_scrollback_cur->cur = start; count = end - start; soff = vgacon_scrollback_cur->tail - ((vgacon_scrollback_cur->cnt - end) * c->vc_size_row); soff -= count * c->vc_size_row; if (soff < 0) soff += vgacon_scrollback_cur->size; count = vgacon_scrollback_cur->cnt - start; if (count > c->vc_rows) count = c->vc_rows; if (count) { int copysize; int diff = c->vc_rows - count; void *d = (void *) c->vc_origin; void *s = (void *) c->vc_screenbuf; count *= c->vc_size_row; /* how much memory to end of buffer left? */ copysize = min(count, vgacon_scrollback_cur->size - soff); scr_memcpyw(d, vgacon_scrollback_cur->data + soff, copysize); d += copysize; count -= copysize; if (count) { scr_memcpyw(d, vgacon_scrollback_cur->data, count); d += count; } if (diff) scr_memcpyw(d, s, diff * c->vc_size_row); } else vgacon_cursor(c, CM_MOVE); }

Contributors

PersonTokensPropCommitsCommitProp
Antonino A. Daplas23466.29%116.67%
Marcin Ślusarz6518.41%233.33%
Manuel Schölling5114.45%233.33%
Jiri Slaby30.85%116.67%
Total353100.00%6100.00%


static void vgacon_flush_scrollback(struct vc_data *c) { size_t size = CONFIG_VGACON_SOFT_SCROLLBACK_SIZE * 1024; vgacon_scrollback_reset(c->vc_num, size); }

Contributors

PersonTokensPropCommitsCommitProp
Manuel Schölling27100.00%2100.00%
Total27100.00%2100.00%

#else #define vgacon_scrollback_startup(...) do { } while (0) #define vgacon_scrollback_init(...) do { } while (0) #define vgacon_scrollback_update(...) do { } while (0) #define vgacon_scrollback_switch(...) do { } while (0)
static void vgacon_restore_screen(struct vc_data *c) { if (c->vc_origin != c->vc_visible_origin) vgacon_scrolldelta(c, 0); }

Contributors

PersonTokensPropCommitsCommitProp
Antonino A. Daplas28100.00%1100.00%
Total28100.00%1100.00%


static void vgacon_scrolldelta(struct vc_data *c, int lines) { vc_scrolldelta_helper(c, lines, vga_rolled_over, (void *)vga_vram_base, vga_vram_size); vga_set_mem_top(c); }

Contributors

PersonTokensPropCommitsCommitProp
Antonino A. Daplas2569.44%133.33%
Jiri Slaby1130.56%266.67%
Total36100.00%3100.00%


static void vgacon_flush_scrollback(struct vc_data *c) { }

Contributors

PersonTokensPropCommitsCommitProp
Manuel Schölling10100.00%1100.00%
Total10100.00%1100.00%

#endif /* CONFIG_VGACON_SOFT_SCROLLBACK */
static const char *vgacon_startup(void) { const char *display_desc = NULL; u16 saved1, saved2; volatile u16 *p; if (screen_info.orig_video_isVGA == VIDEO_TYPE_VLFB || screen_info.orig_video_isVGA == VIDEO_TYPE_EFI) { no_vga: #ifdef CONFIG_DUMMY_CONSOLE conswitchp = &dummy_con; return conswitchp->con_startup(); #else return NULL; #endif } /* boot_params.screen_info reasonably initialized? */ if ((screen_info.orig_video_lines == 0) || (screen_info.orig_video_cols == 0)) goto no_vga; /* VGA16 modes are not handled by VGACON */ if ((screen_info.orig_video_mode == 0x0D) || /* 320x200/4 */ (screen_info.orig_video_mode == 0x0E) || /* 640x200/4 */ (screen_info.orig_video_mode == 0x10) || /* 640x350/4 */ (screen_info.orig_video_mode == 0x12) || /* 640x480/4 */ (screen_info.orig_video_mode == 0x6A)) /* 800x600/4 (VESA) */ goto no_vga; vga_video_num_lines = screen_info.orig_video_lines; vga_video_num_columns = screen_info.orig_video_cols; vgastate.vgabase = NULL; if (screen_info.orig_video_mode == 7) { /* Monochrome display */ vga_vram_base = 0xb0000; vga_video_port_reg = VGA_CRT_IM; vga_video_port_val = VGA_CRT_DM; if ((screen_info.orig_video_ega_bx & 0xff) != 0x10) { static struct resource ega_console_resource = { .name = "ega", .start = 0x3B0, .end = 0x3BF }; vga_video_type = VIDEO_TYPE_EGAM; vga_vram_size = 0x8000; display_desc = "EGA+"; request_resource(&ioport_resource, &ega_console_resource); } else { static struct resource mda1_console_resource = { .name = "mda", .start = 0x3B0, .end = 0x3BB }; static struct resource mda2_console_resource = { .name = "mda", .start = 0x3BF, .end = 0x3BF }; vga_video_type = VIDEO_TYPE_MDA; vga_vram_size = 0x2000; display_desc = "*MDA"; request_resource(&ioport_resource, &mda1_console_resource); request_resource(&ioport_resource, &mda2_console_resource); vga_video_font_height = 14; } } else { /* If not, it is color. */ vga_can_do_color = true; vga_vram_base = 0xb8000; vga_video_port_reg = VGA_CRT_IC; vga_video_port_val = VGA_CRT_DC; if ((screen_info.orig_video_ega_bx & 0xff) != 0x10) { int i; vga_vram_size = 0x8000; if (!screen_info.orig_video_isVGA) { static struct resource ega_console_resource = { .name = "ega", .start = 0x3C0, .end = 0x3DF }; vga_video_type = VIDEO_TYPE_EGAC; display_desc = "EGA"; request_resource(&ioport_resource, &ega_console_resource); } else { static struct resource vga_console_resource = { .name = "vga+", .start = 0x3C0, .end = 0x3DF }; vga_video_type = VIDEO_TYPE_VGAC; display_desc = "VGA+"; request_resource(&ioport_resource, &vga_console_resource); /* * Normalise the palette registers, to point * the 16 screen colours to the first 16 * DAC entries. */ for (i = 0; i < 16; i++) { inb_p(VGA_IS1_RC); outb_p(i, VGA_ATT_W); outb_p(i, VGA_ATT_W); } outb_p(0x20, VGA_ATT_W); /* * Now set the DAC registers back to their * default values */ for (i = 0; i < 16; i++) { outb_p(color_table[i], VGA_PEL_IW); outb_p(default_red[i], VGA_PEL_D); outb_p(default_grn[i], VGA_PEL_D); outb_p(default_blu[i], VGA_PEL_D); } } } else { static struct resource cga_console_resource = { .name = "cga", .start = 0x3D4, .end = 0x3D5 }; vga_video_type = VIDEO_TYPE_CGA; vga_vram_size = 0x2000; display_desc = "*CGA"; request_resource(&ioport_resource, &cga_console_resource); vga_video_font_height = 8; } } vga_vram_base = VGA_MAP_MEM(vga_vram_base, vga_vram_size); vga_vram_end = vga_vram_base + vga_vram_size; /* * Find out if there is a graphics card present. * Are there smarter methods around? */ p = (volatile u16 *) vga_vram_base; saved1 = scr_readw(p); saved2 = scr_readw(p + 1); scr_writew(0xAA55, p); scr_writew(0x55AA, p + 1); if (scr_readw(p) != 0xAA55 || scr_readw(p + 1) != 0x55AA) { scr_writew(saved1, p); scr_writew(saved2, p + 1); goto no_vga; } scr_writew(0x55AA, p); scr_writew(0xAA55, p + 1); if (scr_readw(p) != 0x55AA || scr_readw(p + 1) != 0xAA55) { scr_writew(saved1, p); scr_writew(saved2, p + 1); goto no_vga; } scr_writew(saved1, p); scr_writew(saved2, p + 1); if (vga_video_type == VIDEO_TYPE_EGAC || vga_video_type == VIDEO_TYPE_VGAC || vga_video_type == VIDEO_TYPE_EGAM) { vga_hardscroll_enabled = vga_hardscroll_user_enable; vga_default_font_height = screen_info.orig_video_points; vga_video_font_height = screen_info.orig_video_points; /* This may be suboptimal but is a safe bet - go with it */ vga_scan_lines = vga_video_font_height * vga_video_num_lines; } vgacon_xres = screen_info.orig_video_cols * VGA_FONTWIDTH; vgacon_yres = vga_scan_lines; if (!vga_init_done) { vgacon_scrollback_startup(); vga_init_done = true; } return display_desc; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)60873.08%1343.33%
James Simmons566.73%516.67%
Greg Kroah-Hartman546.49%13.33%
H. Peter Anvin536.37%13.33%
Antonino A. Daplas222.64%310.00%
Gerd Hoffmann161.92%26.67%
Björn Helgaas121.44%13.33%
Yannick Heneault60.72%13.33%
Jiri Slaby20.24%13.33%
Jan H. Schönherr20.24%13.33%
Mark D Rustad10.12%13.33%
Total832100.00%30100.00%


static void vgacon_init(struct vc_data *c, int init) { struct uni_pagedir *p; /* * We cannot be loaded as a module, therefore init is always 1, * but vgacon_init can be called more than once, and init will * not be 1. */ c->vc_can_do_color = vga_can_do_color; /* set dimensions manually if init != 0 since vc_resize() will fail */ if (init) { c->vc_cols = vga_video_num_columns; c->vc_rows = vga_video_num_lines; } else vc_resize(c, vga_video_num_columns, vga_video_num_lines); c->vc_scan_lines = vga_scan_lines; c->vc_font.height = vga_video_font_height; c->vc_complement_mask = 0x7700; if (vga_512_chars) c->vc_hi_font_mask = 0x0800; p = *c->vc_uni_pagedir_loc; if (c->vc_uni_pagedir_loc != &vgacon_uni_pagedir) { con_free_unimap(c); c->vc_uni_pagedir_loc = &vgacon_uni_pagedir; vgacon_refcount++; } if (!vgacon_uni_pagedir && p) con_set_default_unimap(c); /* Only set the default if the user didn't deliberately override it */ if (global_cursor_default == -1) global_cursor_default = !(screen_info.flags & VIDEO_FLAGS_NOCURSOR); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)7449.66%538.46%
Antonino A. Daplas2315.44%215.38%
Matthew Garrett1912.75%215.38%
James Simmons149.40%17.69%
Bill Nottingham106.71%17.69%
Takashi Iwai96.04%215.38%
Total149100.00%13100.00%


static void vgacon_deinit(struct vc_data *c) { /* When closing the active console, reset video origin */ if (con_is_visible(c)) { c->vc_visible_origin = vga_vram_base; vga_set_mem_top(c); } if (!--vgacon_refcount) con_free_unimap(c); c->vc_uni_pagedir_loc = &c->vc_uni_pagedir; con_set_default_unimap(c); }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)4578.95%562.50%
Francisco Jerez1017.54%112.50%
Takashi Iwai11.75%112.50%
Jiri Slaby11.75%112.50%
Total57100.00%8100.00%


static u8 vgacon_build_attr(struct vc_data *c, u8 color, u8 intensity, u8 blink, u8 underline, u8 reverse, u8 italic) { u8 attr = color; if (vga_can_do_color) { if (italic) attr = (attr & 0xF0) | c->vc_itcolor; else if (underline) attr = (attr & 0xf0) | c->vc_ulcolor; else if (intensity == 0) attr = (attr & 0xf0) | c->vc_halfcolor; } if (reverse) attr = ((attr) & 0x88) | ((((attr) >> 4) | ((attr) << 4)) & 0x77); if (blink) attr ^= 0x80; if (intensity == 2) attr ^= 0x08; if (!vga_can_do_color) { if (italic) attr = (attr & 0xF8) | 0x02; else if (underline) attr = (attr & 0xf8) | 0x01; else if (intensity == 0) attr = (attr & 0xf0) | 0x08; } return attr; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)16782.67%480.00%
Jan Engelhardt3517.33%120.00%
Total202100.00%5100.00%


static void vgacon_invert_region(struct vc_data *c, u16 * p, int count) { const bool col = vga_can_do_color; while (count--) { u16 a = scr_readw(p); if (col) a = ((a) & 0x88ff) | (((a) & 0x7000) >> 4) | (((a) & 0x0700) << 4); else a ^= ((a & 0x0700) == 0x0100) ? 0x7000 : 0x7700; scr_writew(a, p++); } }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds (pre-git)10098.04%375.00%
Jiri Slaby21.96%125.00%
Total102100.00%4100.00%


static void vgacon_set_cursor_size(int xpos, int from, int to) { unsigned long flags; int curs, cure; if ((from == cursor_size_lastfrom) && (to == cursor_size_lastto)) return; cursor_size_lastfrom = from; cursor_size_lastto = to; raw_spin_lock_irqsave(&vga_lock, flags); if (vga_video_type >= VIDEO_TYPE_VGAC) { outb_p(VGA_CRTC_CURSOR_START, vga_video_port_reg);