summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2019-04-05 03:53:28 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-27 10:37:40 +0300
commitc2116717884cf9ec6841630ea257d5c5c3a859c7 (patch)
tree6eb8b84347978e40a1c088ef10b430abdce8c2a1 /drivers/tty
parent5ae77c340c52b331e18af1a358ba7b2e3dcc3390 (diff)
downloadlinux-c2116717884cf9ec6841630ea257d5c5c3a859c7.tar.xz
vt: fix cursor when clearing the screen
commit b2ecf00631362a83744e5ec249947620db5e240c upstream. The patch a6dbe4427559 ("vt: perform safe console erase in the right order") introduced a bug. The conditional do_update_region() was replaced by a call to update_region() that does contain the conditional already, but with unwanted extra side effects such as restoring the cursor drawing. In order to reproduce the bug: - use framebuffer console with the AMDGPU driver - type "links" to start the console www browser - press 'q' and space to exit links Now the cursor will be permanently visible in the center of the screen. It will stay there until something overwrites it. The bug goes away if we change update_region() back to the conditional do_update_region(). [ nico: reworded changelog ] Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Reviewed-by: Nicolas Pitre <nico@fluxnic.net> Cc: stable@vger.kernel.org Fixes: a6dbe4427559 ("vt: perform safe console erase in the right order") Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/vt/vt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 9646ff63e77a..b6621a2e916d 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -1518,7 +1518,8 @@ static void csi_J(struct vc_data *vc, int vpar)
return;
}
scr_memsetw(start, vc->vc_video_erase_char, 2 * count);
- update_region(vc, (unsigned long) start, count);
+ if (con_should_update(vc))
+ do_update_region(vc, (unsigned long) start, count);
vc->vc_need_wrap = 0;
}