1
0
Fork 0
alistair23-linux/drivers/video/console
Nicolas Pitre bfd8d8fe98 vgacon: unconfuse vc_origin when using soft scrollback
When CONFIG_VGACON_SOFT_SCROLLBACK is selected, the VGA display memory
index and vc_visible_origin don't change when scrollback is activated.
The actual screen content is saved away and the scrollbackdata is copied
over it. However the vt code, and /dev/vcs devices in particular, still
expect vc_origin to always point at the actual screen content not the
displayed scrollback content.

So adjust vc_origin to point at the saved screen content when scrollback
is active and set it back to vc_visible_origin when restoring the screen.

This fixes /dev/vcsa<n> that return scrollback content when they
shouldn't (onli /dev/vcsa without a number should), and also fixes
/dev/vcsu that should return scrollback content when scrollback is
active but currently doesn't.

An unnecessary call to vga_set_mem_top() is also removed.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-18 13:45:22 +01:00
..
Kconfig fbcon: Only allow FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER if fbdev is builtin 2018-08-10 17:23:01 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dummycon.c dummycon: Stop exporting dummycon_[un]register_output_notifier 2018-08-10 17:23:02 +02:00
mdacon.c mdacon: replace MDA_ADDR macro by inline function 2017-06-14 17:40:56 +02:00
newport_con.c console: Drop added "static" for newport_con 2018-02-28 13:12:38 +01:00
sticon.c tty: vt, cleanup and document con_scroll 2016-10-27 16:37:43 +02:00
sticore.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
vgacon.c vgacon: unconfuse vc_origin when using soft scrollback 2019-01-18 13:45:22 +01:00