drm/panel: st7703: Fix timings when entering/exiting sleep
authorFrank Oltmanns <frank@oltmanns.dev>
Mon, 13 Feb 2023 12:32:38 +0000 (13:32 +0100)
committerGuido Günther <agx@sigxcpu.org>
Sun, 15 Oct 2023 12:23:00 +0000 (14:23 +0200)
commit0ddd30471a5dd78ff762ffb9eeae1d573283243a
tree07fbbaa6b549bd20fc0e918a03ce5ba2fc96fbd4
parentd12d635bb03c7cb4830acb641eb176ee9ff2aa89
drm/panel: st7703: Fix timings when entering/exiting sleep

Fix flickering of the pinephone's XDB599 panel that happens after
resume.

Extend the delay after issuing the command to exit sleep mode from 60 to
120 msec as per the controller's specification.

Introduce a 120 msec delay after issuing the command to enter sleep
mode. This is needed in order for the controller to reliably finalize
the sleep in sequence before switching of power supply.

In contrast to the JH057N panel, the XBD599 panel does not require a 20
msec delay after initialization and exiting sleep mode. Therefore, move
the delay into the already existing device specific initialization
function.

The XDB599 does not require a 20 msec delay between the SETBGP and
SETVCOM commands. Therefore, remove the delay from the device specific
initialization function.

Signed-off-by: Frank Oltmanns <frank@oltmanns.dev>
Cc: Ondrej Jirman <megi@xff.cz>
Reported-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Guido Günther <agx@sigxcpu.org>
Tested-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230213123238.76889-2-frank@oltmanns.dev
drivers/gpu/drm/panel/panel-sitronix-st7703.c