]>
Commit | Line | Data |
---|---|---|
53722911 GKH |
1 | From ec1587d5073f29820e358f3a383850d61601d981 Mon Sep 17 00:00:00 2001 |
2 | From: Yifeng Li <tomli@tomli.me> | |
3 | Date: Mon, 1 Apr 2019 17:46:59 +0200 | |
4 | Subject: fbdev: sm712fb: fix boot screen glitch when sm712fb replaces VGA | |
5 | ||
6 | From: Yifeng Li <tomli@tomli.me> | |
7 | ||
8 | commit ec1587d5073f29820e358f3a383850d61601d981 upstream. | |
9 | ||
10 | When the machine is booted in VGA mode, loading sm712fb would cause | |
11 | a glitch of random pixels shown on the screen. To prevent it from | |
12 | happening, we first clear the entire framebuffer, and we also need | |
13 | to stop calling smtcfb_setmode() during initialization, the fbdev | |
14 | layer will call it for us later when it's ready. | |
15 | ||
16 | Signed-off-by: Yifeng Li <tomli@tomli.me> | |
17 | Tested-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> | |
18 | Cc: Teddy Wang <teddy.wang@siliconmotion.com> | |
19 | Cc: <stable@vger.kernel.org> # v4.4+ | |
20 | Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | |
21 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
22 | ||
23 | --- | |
24 | drivers/video/fbdev/sm712fb.c | 6 +++++- | |
25 | 1 file changed, 5 insertions(+), 1 deletion(-) | |
26 | ||
27 | --- a/drivers/video/fbdev/sm712fb.c | |
28 | +++ b/drivers/video/fbdev/sm712fb.c | |
29 | @@ -1492,7 +1492,11 @@ static int smtcfb_pci_probe(struct pci_d | |
30 | if (err) | |
31 | goto failed; | |
32 | ||
33 | - smtcfb_setmode(sfb); | |
34 | + /* | |
35 | + * The screen would be temporarily garbled when sm712fb takes over | |
36 | + * vesafb or VGA text mode. Zero the framebuffer. | |
37 | + */ | |
38 | + memset_io(sfb->lfb, 0, sfb->fb->fix.smem_len); | |
39 | ||
40 | err = register_framebuffer(info); | |
41 | if (err < 0) |