Commit cac8a630 authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman

vgacon: drop BROKEN_GRAPHICS_PROGRAMS

BROKEN_GRAPHICS_PROGRAMS is defined when CONFIG_VGA_CONSOLE=y. And
vgacon.c is built exclusively in that case too. So the check for
BROKEN_GRAPHICS_PROGRAMS is pointless in vgacon.c as it is always true.
So remove the test and BROKEN_GRAPHICS_PROGRAMS completely.

This also eliminates the need for vga_font_is_default global as it is
only set and never read.

Cc: dri-devel@lists.freedesktop.org
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210105120239.28031-9-jslaby@suse.czSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ff2047fb
...@@ -90,7 +90,6 @@ static unsigned int vga_video_num_lines; /* Number of text lines */ ...@@ -90,7 +90,6 @@ static unsigned int vga_video_num_lines; /* Number of text lines */
static bool vga_can_do_color; /* Do we support colors? */ 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 int vga_default_font_height __read_mostly; /* Height of default screen font */
static unsigned char vga_video_type __read_mostly; /* Card type */ static unsigned char vga_video_type __read_mostly; /* Card type */
static bool vga_font_is_default = true;
static int vga_vesa_blanked; static int vga_vesa_blanked;
static bool vga_palette_blanked; static bool vga_palette_blanked;
static bool vga_is_gfx; static bool vga_is_gfx;
...@@ -878,7 +877,6 @@ static int vgacon_do_font_op(struct vgastate *state, char *arg, int set, ...@@ -878,7 +877,6 @@ static int vgacon_do_font_op(struct vgastate *state, char *arg, int set,
beg = 0x0a; beg = 0x0a;
} }
#ifdef BROKEN_GRAPHICS_PROGRAMS
/* /*
* All fonts are loaded in slot 0 (0:1 for 512 ch) * All fonts are loaded in slot 0 (0:1 for 512 ch)
*/ */
...@@ -886,24 +884,7 @@ static int vgacon_do_font_op(struct vgastate *state, char *arg, int set, ...@@ -886,24 +884,7 @@ static int vgacon_do_font_op(struct vgastate *state, char *arg, int set,
if (!arg) if (!arg)
return -EINVAL; /* Return to default font not supported */ return -EINVAL; /* Return to default font not supported */
vga_font_is_default = false;
font_select = ch512 ? 0x04 : 0x00; font_select = ch512 ? 0x04 : 0x00;
#else
/*
* The default font is kept in slot 0 and is never touched.
* A custom font is loaded in slot 2 (256 ch) or 2:3 (512 ch)
*/
if (set) {
vga_font_is_default = !arg;
if (!arg)
ch512 = false; /* Default font is always 256 */
font_select = arg ? (ch512 ? 0x0e : 0x0a) : 0x00;
}
if (!vga_font_is_default)
charmap += 4 * cmapsz;
#endif
raw_spin_lock_irq(&vga_lock); raw_spin_lock_irq(&vga_lock);
/* First, the Sequencer */ /* First, the Sequencer */
......
...@@ -16,18 +16,6 @@ ...@@ -16,18 +16,6 @@
#include <linux/consolemap.h> #include <linux/consolemap.h>
#include <linux/notifier.h> #include <linux/notifier.h>
/*
* Presently, a lot of graphics programs do not restore the contents of
* the higher font pages. Defining this flag will avoid use of them, but
* will lose support for PIO_FONTRESET. Note that many font operations are
* not likely to work with these programs anyway; they need to be
* fixed. The linux/Documentation directory includes a code snippet
* to save and restore the text font.
*/
#ifdef CONFIG_VGA_CONSOLE
#define BROKEN_GRAPHICS_PROGRAMS 1
#endif
void kd_mksound(unsigned int hz, unsigned int ticks); void kd_mksound(unsigned int hz, unsigned int ticks);
int kbd_rate(struct kbd_repeat *rep); int kbd_rate(struct kbd_repeat *rep);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment