Commit 8e1e13b6 authored by Yifeng Li's avatar Yifeng Li Committed by Kleber Sacilotto de Souza

fbdev: sm712fb: fix boot screen glitch when sm712fb replaces VGA

BugLink: https://bugs.launchpad.net/bugs/1832661

commit ec1587d5 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: default avatarYifeng Li <tomli@tomli.me>
Tested-by: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
Cc: <stable@vger.kernel.org>  # v4.4+
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 98682b8e
......@@ -1492,7 +1492,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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment