/* * linux/drivers/video/console/sticon.c - console driver using HP's STI firmware * * Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org> * Copyright (C) 2002-2020 Helge Deller <deller@gmx.de> * * Based on linux/drivers/video/vgacon.c and linux/drivers/video/fbcon.c, * which were * * Created 28 Sep 1997 by Geert Uytterhoeven * Rewritten by Martin Mares <mj@ucw.cz>, July 1998 * Copyright (C) 1991, 1992 Linus Torvalds * 1995 Jay Estabrook * Copyright (C) 1995 Geert Uytterhoeven * Copyright (C) 1993 Bjoern Brauel * Roman Hodek * Copyright (C) 1993 Hamish Macdonald * Greg Harp * Copyright (C) 1994 David Carter [carter@compsci.bristol.ac.uk] * * with work by William Rucklidge (wjr@cs.cornell.edu) * Geert Uytterhoeven * Jes Sorensen (jds@kom.auc.dk) * Martin Apel * with work by Guenther Kelleter * Martin Schaller * Andreas Schwab * Emmanuel Marty (core@ggi-project.org) * Jakub Jelinek (jj@ultra.linux.cz) * Martin Mares <mj@ucw.cz> * * 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. *
*/
p = (unsignedchar *) new_font;
p += sizeof(*new_font); for (i = 0; i < op->charcount; i++) {
memcpy(p, data, bpc);
data += pitch*32;
p += bpc;
}
FNTCRC(cooked_font) = crc32(0, new_font, size + sizeof(*new_font));
sti_font_convert_bytemode(sti, cooked_font);
new_font = cooked_font->raw_ptr;
/* check if font is already used by other console */ for (i = 0; i < MAX_NR_CONSOLES; i++) { if (font_data[i] != STI_DEF_FONT
&& (FNTCRC(font_data[i]) == FNTCRC(cooked_font))) {
kfree(new_font);
kfree(cooked_font); /* current font is the same as the new one */ if (i == unit) return 0;
cooked_font = font_data[i];
new_font = cooked_font->raw_ptr; break;
}
}
/* clear screen with old font: we now may have less rows */
vc_old_rows = vc->vc_rows;
vc_old_cols = vc->vc_cols;
sti_clear(sticon_sti, 0, 0, vc_old_rows, vc_old_cols,
vc->vc_video_erase_char, font_data[vc->vc_num]);
/* delete old font in case it is a user font */
sticon_set_def_font(unit);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.