drm/panel: ili9882t: Avoid blurred screen from fast sleep
authorCong Yang <yangcong5@huaqin.corp-partner.google.com>
Fri, 13 Oct 2023 09:18:43 +0000 (17:18 +0800)
committerDouglas Anderson <dianders@chromium.org>
Thu, 19 Oct 2023 21:45:28 +0000 (14:45 -0700)
commit5820a1932ce85ea416e7f99ee91c54cf0d2130f3
tree6591f2ff35ad45a126d77a690281e28cf2cd9b8a
parente2450d32e5fb5f89bf93e52f4ce694ad655cdc66
drm/panel: ili9882t: Avoid blurred screen from fast sleep

At present, we have found that there may be a problem of blurred
screen during fast sleep/resume. The direct cause of the blurred
screen is that the IC does not receive 0x28/0x10. Because of the
particularity of the IC, before the panel enters sleep hid must
stop scanning, as i2c_hid_core_suspend before ili9882t_disable.
If move the ili9882t_enter_sleep_mode function to ili9882t_unprepare,
touch reset will pull low before panel entersleep, which does not meet
the timing requirements.. So in order to solve this problem, the IC
can handle it through the exception mechanism when it cannot receive
0x28/0x10 command. Handling exceptions requires a reset 50ms delay.
Refer to vendor detailed analysis [1].

Ilitek vendor also suggested switching the page before entering sleep to
avoid panel IC not receiving 0x28/0x10 command.

Note: 0x28 is display off, 0x10 is sleep in.

[1]: https://github.com/ILITEK-LoganLin/Document/tree/main/ILITEK_Power_Sequence

Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20231013091844.804310-3-yangcong5@huaqin.corp-partner.google.com
drivers/gpu/drm/panel/panel-ilitek-ili9882t.c