Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 066009cf authored by Yifeng Li's avatar Yifeng Li Committed by Greg Kroah-Hartman
Browse files

fbdev: sm712fb: fix brightness control on reboot, don't set SR30



commit 5481115e25e42b9215f2619452aa99c95f08492f upstream.

On a Thinkpad s30 (Pentium III / i440MX, Lynx3DM), rebooting with
sm712fb framebuffer driver would cause the role of brightness up/down
button to swap.

Experiments showed the FPR30 register caused this behavior. Moreover,
even if this register don't have side-effect on other systems, over-
writing it is also highly questionable, since it was originally
configurated by the motherboard manufacturer by hardwiring pull-down
resistors to indicate the type of LCD panel. We should not mess with
it.

Stop writing to the SR30 (a.k.a FPR30) register.

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>
parent 2bfc2e36
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1144,8 +1144,8 @@ static void sm7xx_set_timing(struct smtcfb_info *sfb)


		/* init SEQ register SR30 - SR75 */
		/* init SEQ register SR30 - SR75 */
		for (i = 0; i < SIZE_SR30_SR75; i++)
		for (i = 0; i < SIZE_SR30_SR75; i++)
			if ((i + 0x30) != 0x62 && (i + 0x30) != 0x6a &&
			if ((i + 0x30) != 0x30 && (i + 0x30) != 0x62 &&
			    (i + 0x30) != 0x6b)
			    (i + 0x30) != 0x6a && (i + 0x30) != 0x6b)
				smtc_seqw(i + 0x30,
				smtc_seqw(i + 0x30,
					  vgamode[j].init_sr30_sr75[i]);
					  vgamode[j].init_sr30_sr75[i]);