summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorYifeng Li <tomli@tomli.me>2019-04-01 18:46:59 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-25 19:16:41 +0300
commit61f7fcb302a31fd3f6ca65ee879d6e828bc05dfa (patch)
treefb12224619aa83e64ee5adc2d87dc96eab2bf3d8 /drivers/video
parentc77769b7feaffdc9febdc9ae0b0f1295cd55a699 (diff)
downloadlinux-61f7fcb302a31fd3f6ca65ee879d6e828bc05dfa.tar.xz
fbdev: sm712fb: fix boot screen glitch when sm712fb replaces VGA
commit ec1587d5073f29820e358f3a383850d61601d981 upstream. When the machine is booted in VGA mode, loading sm712fb would cause a glitch of random pixels shown on the screen. To prevent it from happening, we first clear the entire framebuffer, and we also need to stop calling smtcfb_setmode() during initialization, the fbdev layer will call it for us later when it's ready. Signed-off-by: Yifeng Li <tomli@tomli.me> Tested-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: Teddy Wang <teddy.wang@siliconmotion.com> Cc: <stable@vger.kernel.org> # v4.4+ Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/sm712fb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/video/fbdev/sm712fb.c b/drivers/video/fbdev/sm712fb.c
index 1a3d232c2916..e8149f0f47d5 100644
--- a/drivers/video/fbdev/sm712fb.c
+++ b/drivers/video/fbdev/sm712fb.c
@@ -1493,7 +1493,11 @@ static int smtcfb_pci_probe(struct pci_dev *pdev,
if (err)
goto failed;
- smtcfb_setmode(sfb);
+ /*
+ * The screen would be temporarily garbled when sm712fb takes over
+ * vesafb or VGA text mode. Zero the framebuffer.
+ */
+ memset_io(sfb->lfb, 0, sfb->fb->fix.smem_len);
err = register_framebuffer(info);
if (err < 0)