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

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 <[email protected]>
Tested-by: Sudip Mukherjee <[email protected]>
Cc: Teddy Wang <[email protected]>
Cc: <[email protected]>  # v4.4+
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
This commit is contained in:
Yifeng Li 2019-04-01 17:46:59 +02:00 • committed by Bartlomiej Zolnierkiewicz
commit ec1587d507

View file

@ -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)