]>
Commit | Line | Data |
---|---|---|
b0d5dadb GKH |
1 | From 5481115e25e42b9215f2619452aa99c95f08492f Mon Sep 17 00:00:00 2001 |
2 | From: Yifeng Li <tomli@tomli.me> | |
3 | Date: Mon, 1 Apr 2019 17:46:58 +0200 | |
4 | Subject: fbdev: sm712fb: fix brightness control on reboot, don't set SR30 | |
5 | ||
6 | From: Yifeng Li <tomli@tomli.me> | |
7 | ||
8 | commit 5481115e25e42b9215f2619452aa99c95f08492f upstream. | |
9 | ||
10 | On a Thinkpad s30 (Pentium III / i440MX, Lynx3DM), rebooting with | |
11 | sm712fb framebuffer driver would cause the role of brightness up/down | |
12 | button to swap. | |
13 | ||
14 | Experiments showed the FPR30 register caused this behavior. Moreover, | |
15 | even if this register don't have side-effect on other systems, over- | |
16 | writing it is also highly questionable, since it was originally | |
17 | configurated by the motherboard manufacturer by hardwiring pull-down | |
18 | resistors to indicate the type of LCD panel. We should not mess with | |
19 | it. | |
20 | ||
21 | Stop writing to the SR30 (a.k.a FPR30) register. | |
22 | ||
23 | Signed-off-by: Yifeng Li <tomli@tomli.me> | |
24 | Tested-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> | |
25 | Cc: Teddy Wang <teddy.wang@siliconmotion.com> | |
26 | Cc: <stable@vger.kernel.org> # v4.4+ | |
27 | Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | |
28 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
29 | ||
30 | --- | |
31 | drivers/video/fbdev/sm712fb.c | 4 ++-- | |
32 | 1 file changed, 2 insertions(+), 2 deletions(-) | |
33 | ||
34 | --- a/drivers/video/fbdev/sm712fb.c | |
35 | +++ b/drivers/video/fbdev/sm712fb.c | |
36 | @@ -1144,8 +1144,8 @@ static void sm7xx_set_timing(struct smtc | |
37 | ||
38 | /* init SEQ register SR30 - SR75 */ | |
39 | for (i = 0; i < SIZE_SR30_SR75; i++) | |
40 | - if ((i + 0x30) != 0x62 && (i + 0x30) != 0x6a && | |
41 | - (i + 0x30) != 0x6b) | |
42 | + if ((i + 0x30) != 0x30 && (i + 0x30) != 0x62 && | |
43 | + (i + 0x30) != 0x6a && (i + 0x30) != 0x6b) | |
44 | smtc_seqw(i + 0x30, | |
45 | vgamode[j].init_sr30_sr75[i]); | |
46 |