drm: panel: simple: Defer unprepare delay till next prepare to shorten it
authorDouglas Anderson <dianders@chromium.org>
Tue, 10 Nov 2020 01:00:56 +0000 (17:00 -0800)
committerSam Ravnborg <sam@ravnborg.org>
Sun, 29 Nov 2020 22:05:12 +0000 (23:05 +0100)
commite5e30dfcf3db1534019c40d94ed58fd2869f9359
treec14ec11f5303b00723bca5b38c1ac6d0595547e2
parent131f909ad55f798f7bd0c3119d93778da312694a
drm: panel: simple: Defer unprepare delay till next prepare to shorten it

It is believed that all of the current users of the "unprepare" delay
don't actually need to wait the amount of time specified directly in
the unprepare phase.  The purpose of the delay that's specified is to
allow the panel to fully power off so that we don't try to power it
back on before it's managed to full power down.

Let's use this observation to avoid the fixed delay that we currently
have.  Instead of delaying, we'll note the current time when the
unprepare happens.  If someone then tries to prepare the panel later
and not enough time has passed, we'll do the delay before starting the
prepare phase.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20201109170018.v4.2.I06a95d83e7fa1bd919c8edd63dacacb5436e495a@changeid
drivers/gpu/drm/panel/panel-simple.c