diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-24 08:39:55 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-24 08:39:55 +0100 |
commit | ba08cf452f3493e96793c9fec4ebb45e7101a0c0 (patch) | |
tree | 61200038de5d9c6ba50dadfa7f065d029fa06174 /drivers/tty/vt/vt.c | |
parent | e24cd4e6d6aa3ca741cdfdfc01118c4016acebea (diff) | |
parent | f8788d86ab28f61f7b46eb6be375f8a726783636 (diff) | |
download | linux-ba08cf452f3493e96793c9fec4ebb45e7101a0c0.tar.bz2 |
Merge 5.6-rc3 into tty-next
We want the tty fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/vt/vt.c')
-rw-r--r-- | drivers/tty/vt/vt.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index a2bbff602999..8fa059ec6cc8 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -937,10 +937,21 @@ static void flush_scrollback(struct vc_data *vc) WARN_CONSOLE_UNLOCKED(); set_origin(vc); - if (vc->vc_sw->con_flush_scrollback) + if (vc->vc_sw->con_flush_scrollback) { vc->vc_sw->con_flush_scrollback(vc); - else + } else if (con_is_visible(vc)) { + /* + * When no con_flush_scrollback method is provided then the + * legacy way for flushing the scrollback buffer is to use + * a side effect of the con_switch method. We do it only on + * the foreground console as background consoles have no + * scrollback buffers in that case and we obviously don't + * want to switch to them. + */ + hide_cursor(vc); vc->vc_sw->con_switch(vc); + set_cursor(vc); + } } /* |