OSDN Git Service

drm/panel: s6e63m0: Order enable/disable sequence
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 17 Aug 2020 21:39:06 +0000 (23:39 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 4 Sep 2020 23:28:11 +0000 (01:28 +0200)
commitec219f1ba23777c84e913b08e192413eea22d220
treee7ec115899151c8283cc3bde6ab3b5185eb9e884
parent83ba7a7b3d4a70fe92122f039539566c9526228c
drm/panel: s6e63m0: Order enable/disable sequence

The upstream S6E63M0 driver has some peculiarities around
the prepare/enable disable/unprepare sequence: the screen
is taken out of sleep in prepare() as part of
s6e63m0_init() the put to on with MIPI_DCS_SET_DISPLAY_ON
in enable().

However it is just put into sleep mode directly in
disable(). As disable()/enable() can be called without
unprepare()/prepare() being called, this is unbalanced,
we should take the display out of sleep in enable()
then turn it off().

Further MIPI_DCS_SET_DISPLAY_OFF is never called
balanced with MIPI_DCS_SET_DISPLAY_ON.

The vendor driver for Samsung GT-I8190 (Golden) does all
of these things in strict order.

Augment the driver to do exit sleep/set display on in
enable() and set display off/enter sleep in disable().

Further send an explicit reset pulse in power_on() so we
come up in a known state, and issue the MCS_ERROR_CHECK
command after setting display on like the vendor driver
does. Also use the timings from the vendor driver in
the sequence.

Doing all of these things makes the display much more
stable on the Samsung GT-I8190 when enabling/disabling
the display pipeline.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
Cc: Stephan Gerhold <stephan@gerhold.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20200817213906.88207-1-linus.walleij@linaro.org
drivers/gpu/drm/panel/panel-samsung-s6e63m0.c