OSDN Git Service

fbdev: sm712fb: fix crashes and garbled display during DPMS modesetting
authorYifeng Li <tomli@tomli.me>
Mon, 1 Apr 2019 15:46:59 +0000 (17:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jun 2019 10:23:48 +0000 (12:23 +0200)
commit0dc2ad06ddad075cf31634ef808e6a55f3c339ba
tree481fd446a678577d1b20a4492c813dc71a081730
parent4673eae95b535cb28700d491705f67cc60239f8e
fbdev: sm712fb: fix crashes and garbled display during DPMS modesetting

commit f627caf55b8e735dcec8fa6538e9668632b55276 upstream.

On a Thinkpad s30 (Pentium III / i440MX, Lynx3DM), blanking the display
or starting the X server will crash and freeze the system, or garble the
display.

Experiments showed this problem can mostly be solved by adjusting the
order of register writes. Also, sm712fb failed to consider the difference
of clock frequency when unblanking the display, and programs the clock for
SM712 to SM720.

Fix them by adjusting the order of register writes, and adding an
additional check for SM720 for programming the clock frequency.

Signed-off-by: Yifeng Li <tomli@tomli.me>
Tested-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
Cc: <stable@vger.kernel.org> # v4.4+
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/video/fbdev/sm712fb.c