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)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Mon, 1 Apr 2019 15:46:59 +0000 (17:46 +0200)
commitf627caf55b8e735dcec8fa6538e9668632b55276
treeee09df7a3f2c6a7dceb6cb1a543f3a73b7a1c8c4
parent9e0e59993df0601cddb95c4f6c61aa3d5e753c00
fbdev: sm712fb: fix crashes and garbled display during DPMS modesetting

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>
drivers/video/fbdev/sm712fb.c