console: Add callback to flush scrollback buffer to consw struct
This new callback is in preparation for persistent scrollback buffer support for VGA consoles. With a single scrollback buffer for all consoles, we could flush the buffer just by invocating consw->con_switch(). But when each VGA console has its own scrollback buffer, we need a new callback to tell the video console driver which buffer to flush. Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de> Reviewed-by: Andrey Utkin <andrey_utkin@fastmail.com> Tested-by: Andrey Utkin <andrey_utkin@fastmail.com> Tested-by: Adam Borowski <kilobyte@angband.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
这个提交包含在:
@@ -625,6 +625,14 @@ static void save_screen(struct vc_data *vc)
|
||||
vc->vc_sw->con_save_screen(vc);
|
||||
}
|
||||
|
||||
static void flush_scrollback(struct vc_data *vc)
|
||||
{
|
||||
WARN_CONSOLE_UNLOCKED();
|
||||
|
||||
if (vc->vc_sw->con_flush_scrollback)
|
||||
vc->vc_sw->con_flush_scrollback(vc);
|
||||
}
|
||||
|
||||
/*
|
||||
* Redrawing of screen
|
||||
*/
|
||||
@@ -1171,6 +1179,7 @@ static void csi_J(struct vc_data *vc, int vpar)
|
||||
case 3: /* erase scroll-back buffer (and whole display) */
|
||||
scr_memsetw(vc->vc_screenbuf, vc->vc_video_erase_char,
|
||||
vc->vc_screenbuf_size);
|
||||
flush_scrollback(vc);
|
||||
set_origin(vc);
|
||||
if (con_is_visible(vc))
|
||||
update_screen(vc);
|
||||
|
在新工单中引用
屏蔽一个用户