drm: panel: simple: Allow specifying the delay from prepare to enable
authorDouglas Anderson <dianders@chromium.org>
Tue, 10 Nov 2020 01:00:57 +0000 (17:00 -0800)
committerSam Ravnborg <sam@ravnborg.org>
Sun, 29 Nov 2020 22:05:16 +0000 (23:05 +0100)
commit4beb04beb24afe5268bf91407b44864f42f448ed
treefc074d06fcce44f70396f62bafec4b880bd37973
parente5e30dfcf3db1534019c40d94ed58fd2869f9359
drm: panel: simple: Allow specifying the delay from prepare to enable

On the panel I'm looking at, there's an 80 ms minimum time between HPD
being asserted by the panel and setting the backlight enable GPIO.
While we could just add an 80 ms "enable" delay, this is not ideal.
Link training is allowed to happen in parallel with this delay so the
fixed 80 ms delay over-delays.

We'll support this by logging the time at the end of prepare and then
delaying in enable if enough time hasn't passed.

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.3.Ib9ce3c6482f464bf594161581521ced46bbd54ed@changeid
drivers/gpu/drm/panel/panel-simple.c