]>
Commit | Line | Data |
---|---|---|
6be6d5d0 GKH |
1 | From 6053d3a4793e5bde6299ac5388e76a3bf679ff65 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 support for 1024x768-16 mode | |
5 | ||
6 | From: Yifeng Li <tomli@tomli.me> | |
7 | ||
8 | commit 6053d3a4793e5bde6299ac5388e76a3bf679ff65 upstream. | |
9 | ||
10 | In order to support the 1024x600 panel on Yeeloong Loongson MIPS | |
11 | laptop, the original 1024x768-16 table was modified to 1024x600-16, | |
12 | without leaving the original. It causes problem on x86 laptop as | |
13 | the 1024x768-16 support was still claimed but not working. | |
14 | ||
15 | Fix it by introducing the 1024x768-16 mode. | |
16 | ||
17 | Signed-off-by: Yifeng Li <tomli@tomli.me> | |
18 | Tested-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> | |
19 | Cc: Teddy Wang <teddy.wang@siliconmotion.com> | |
20 | Cc: <stable@vger.kernel.org> # v4.4+ | |
21 | Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | |
22 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
23 | ||
24 | --- | |
25 | drivers/video/fbdev/sm712fb.c | 59 ++++++++++++++++++++++++++++++++++++++++++ | |
26 | 1 file changed, 59 insertions(+) | |
27 | ||
28 | --- a/drivers/video/fbdev/sm712fb.c | |
29 | +++ b/drivers/video/fbdev/sm712fb.c | |
30 | @@ -530,6 +530,65 @@ static const struct modeinit vgamode[] = | |
31 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x15, 0x03, | |
32 | }, | |
33 | }, | |
34 | + { /* 1024 x 768 16Bpp 60Hz */ | |
35 | + 1024, 768, 16, 60, | |
36 | + /* Init_MISC */ | |
37 | + 0xEB, | |
38 | + { /* Init_SR0_SR4 */ | |
39 | + 0x03, 0x01, 0x0F, 0x03, 0x0E, | |
40 | + }, | |
41 | + { /* Init_SR10_SR24 */ | |
42 | + 0xF3, 0xB6, 0xC0, 0xDD, 0x00, 0x0E, 0x17, 0x2C, | |
43 | + 0x99, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, | |
44 | + 0xC4, 0x30, 0x02, 0x01, 0x01, | |
45 | + }, | |
46 | + { /* Init_SR30_SR75 */ | |
47 | + 0x38, 0x03, 0x20, 0x09, 0xC0, 0x3A, 0x3A, 0x3A, | |
48 | + 0x3A, 0x3A, 0x3A, 0x3A, 0x00, 0x00, 0x03, 0xFF, | |
49 | + 0x00, 0xFC, 0x00, 0x00, 0x20, 0x18, 0x00, 0xFC, | |
50 | + 0x20, 0x0C, 0x44, 0x20, 0x00, 0x00, 0x00, 0x3A, | |
51 | + 0x06, 0x68, 0xA7, 0x7F, 0x83, 0x24, 0xFF, 0x03, | |
52 | + 0x0F, 0x60, 0x59, 0x3A, 0x3A, 0x00, 0x00, 0x3A, | |
53 | + 0x01, 0x80, 0x7E, 0x1A, 0x1A, 0x00, 0x00, 0x00, | |
54 | + 0x50, 0x03, 0x74, 0x14, 0x3B, 0x0D, 0x09, 0x02, | |
55 | + 0x04, 0x45, 0x30, 0x30, 0x40, 0x20, | |
56 | + }, | |
57 | + { /* Init_SR80_SR93 */ | |
58 | + 0xFF, 0x07, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3A, | |
59 | + 0xF7, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x3A, 0x3A, | |
60 | + 0x00, 0x00, 0x00, 0x00, | |
61 | + }, | |
62 | + { /* Init_SRA0_SRAF */ | |
63 | + 0x00, 0xFB, 0x9F, 0x01, 0x00, 0xED, 0xED, 0xED, | |
64 | + 0x7B, 0xFB, 0xFF, 0xFF, 0x97, 0xEF, 0xBF, 0xDF, | |
65 | + }, | |
66 | + { /* Init_GR00_GR08 */ | |
67 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0F, | |
68 | + 0xFF, | |
69 | + }, | |
70 | + { /* Init_AR00_AR14 */ | |
71 | + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, | |
72 | + 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, | |
73 | + 0x41, 0x00, 0x0F, 0x00, 0x00, | |
74 | + }, | |
75 | + { /* Init_CR00_CR18 */ | |
76 | + 0xA3, 0x7F, 0x7F, 0x00, 0x85, 0x16, 0x24, 0xF5, | |
77 | + 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
78 | + 0x03, 0x09, 0xFF, 0x80, 0x40, 0xFF, 0x00, 0xE3, | |
79 | + 0xFF, | |
80 | + }, | |
81 | + { /* Init_CR30_CR4D */ | |
82 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x20, | |
83 | + 0x00, 0x00, 0x00, 0x40, 0x00, 0xFF, 0xBF, 0xFF, | |
84 | + 0xA3, 0x7F, 0x00, 0x86, 0x15, 0x24, 0xFF, 0x00, | |
85 | + 0x01, 0x07, 0xE5, 0x20, 0x7F, 0xFF, | |
86 | + }, | |
87 | + { /* Init_CR90_CRA7 */ | |
88 | + 0x55, 0xD9, 0x5D, 0xE1, 0x86, 0x1B, 0x8E, 0x26, | |
89 | + 0xDA, 0x8D, 0xDE, 0x94, 0x00, 0x00, 0x18, 0x00, | |
90 | + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x15, 0x03, | |
91 | + }, | |
92 | + }, | |
93 | { /* mode#5: 1024 x 768 24Bpp 60Hz */ | |
94 | 1024, 768, 24, 60, | |
95 | /* Init_MISC */ |