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

tty: vt, drop VT_BUF_VRAM_ONLY

It is never defined. And I spent quite some time looking into the
history and cannot find how this was ever used. Given it was not used
in the history, I doubt it currently works as expected after the years
of changes all over the code.

So kill it.
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 52ad1f38
...@@ -278,12 +278,7 @@ static void notify_update(struct vc_data *vc) ...@@ -278,12 +278,7 @@ static void notify_update(struct vc_data *vc)
*/ */
#define IS_FG(vc) ((vc)->vc_num == fg_console) #define IS_FG(vc) ((vc)->vc_num == fg_console)
#ifdef VT_BUF_VRAM_ONLY
#define DO_UPDATE(vc) 0
#else
#define DO_UPDATE(vc) (CON_IS_VISIBLE(vc) && !console_blanked) #define DO_UPDATE(vc) (CON_IS_VISIBLE(vc) && !console_blanked)
#endif
static inline unsigned short *screenpos(struct vc_data *vc, int offset, int viewed) static inline unsigned short *screenpos(struct vc_data *vc, int offset, int viewed)
{ {
...@@ -349,7 +344,6 @@ static void scrdown(struct vc_data *vc, unsigned int t, unsigned int b, int nr) ...@@ -349,7 +344,6 @@ static void scrdown(struct vc_data *vc, unsigned int t, unsigned int b, int nr)
static void do_update_region(struct vc_data *vc, unsigned long start, int count) static void do_update_region(struct vc_data *vc, unsigned long start, int count)
{ {
#ifndef VT_BUF_VRAM_ONLY
unsigned int xx, yy, offset; unsigned int xx, yy, offset;
u16 *p; u16 *p;
...@@ -390,7 +384,6 @@ static void do_update_region(struct vc_data *vc, unsigned long start, int count) ...@@ -390,7 +384,6 @@ static void do_update_region(struct vc_data *vc, unsigned long start, int count)
start = vc->vc_sw->con_getxy(vc, start, NULL, NULL); start = vc->vc_sw->con_getxy(vc, start, NULL, NULL);
} }
} }
#endif
} }
void update_region(struct vc_data *vc, unsigned long start, int count) void update_region(struct vc_data *vc, unsigned long start, int count)
...@@ -413,7 +406,6 @@ static u8 build_attr(struct vc_data *vc, u8 _color, u8 _intensity, u8 _blink, ...@@ -413,7 +406,6 @@ static u8 build_attr(struct vc_data *vc, u8 _color, u8 _intensity, u8 _blink,
return vc->vc_sw->con_build_attr(vc, _color, _intensity, return vc->vc_sw->con_build_attr(vc, _color, _intensity,
_blink, _underline, _reverse, _italic); _blink, _underline, _reverse, _italic);
#ifndef VT_BUF_VRAM_ONLY
/* /*
* ++roman: I completely changed the attribute format for monochrome * ++roman: I completely changed the attribute format for monochrome
* mode (!can_do_color). The formerly used MDA (monochrome display * mode (!can_do_color). The formerly used MDA (monochrome display
...@@ -448,9 +440,6 @@ static u8 build_attr(struct vc_data *vc, u8 _color, u8 _intensity, u8 _blink, ...@@ -448,9 +440,6 @@ static u8 build_attr(struct vc_data *vc, u8 _color, u8 _intensity, u8 _blink,
a <<= 1; a <<= 1;
return a; return a;
} }
#else
return 0;
#endif
} }
static void update_attr(struct vc_data *vc) static void update_attr(struct vc_data *vc)
...@@ -470,10 +459,9 @@ void invert_screen(struct vc_data *vc, int offset, int count, int viewed) ...@@ -470,10 +459,9 @@ void invert_screen(struct vc_data *vc, int offset, int count, int viewed)
count /= 2; count /= 2;
p = screenpos(vc, offset, viewed); p = screenpos(vc, offset, viewed);
if (vc->vc_sw->con_invert_region) if (vc->vc_sw->con_invert_region) {
vc->vc_sw->con_invert_region(vc, p, count); vc->vc_sw->con_invert_region(vc, p, count);
#ifndef VT_BUF_VRAM_ONLY } else {
else {
u16 *q = p; u16 *q = p;
int cnt = count; int cnt = count;
u16 a; u16 a;
...@@ -501,7 +489,7 @@ void invert_screen(struct vc_data *vc, int offset, int count, int viewed) ...@@ -501,7 +489,7 @@ void invert_screen(struct vc_data *vc, int offset, int count, int viewed)
} }
} }
} }
#endif
if (DO_UPDATE(vc)) if (DO_UPDATE(vc))
do_update_region(vc, (unsigned long) p, count); do_update_region(vc, (unsigned long) p, count);
notify_update(vc); notify_update(vc);
...@@ -2178,14 +2166,10 @@ static int is_double_width(uint32_t ucs) ...@@ -2178,14 +2166,10 @@ static int is_double_width(uint32_t ucs)
/* acquires console_lock */ /* acquires console_lock */
static int do_con_write(struct tty_struct *tty, const unsigned char *buf, int count) static int do_con_write(struct tty_struct *tty, const unsigned char *buf, int count)
{ {
#ifdef VT_BUF_VRAM_ONLY
#define FLUSH do { } while(0);
#else
#define FLUSH if (draw_x >= 0) { \ #define FLUSH if (draw_x >= 0) { \
vc->vc_sw->con_putcs(vc, (u16 *)draw_from, (u16 *)draw_to - (u16 *)draw_from, vc->vc_y, draw_x); \ vc->vc_sw->con_putcs(vc, (u16 *)draw_from, (u16 *)draw_to - (u16 *)draw_from, vc->vc_y, draw_x); \
draw_x = -1; \ draw_x = -1; \
} }
#endif
int c, tc, ok, n = 0, draw_x = -1; int c, tc, ok, n = 0, draw_x = -1;
unsigned int currcons; unsigned int currcons;
......
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