]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/bridge: parade-ps8640: Provide wait_hpd_asserted() in struct drm_dp_aux
authorDouglas Anderson <dianders@chromium.org>
Tue, 14 Jun 2022 21:54:18 +0000 (14:54 -0700)
committerDouglas Anderson <dianders@chromium.org>
Tue, 21 Jun 2022 16:06:53 +0000 (09:06 -0700)
commitf5aa7d46b0eec280ac022664f3e8b6bc9f4ee099
treeb2288dc26a91a85b050769c2deb7db1fb49c1d73
parent3b5765df375c90d46316822131acdd5cfb1c5869
drm/bridge: parade-ps8640: Provide wait_hpd_asserted() in struct drm_dp_aux

This implements the callback added by the patch ("drm/dp: Add
wait_hpd_asserted() callback to struct drm_dp_aux").

With this change and all the two "DP AUX Endpoint" drivers changed to
use wait_hpd_asserted(), we no longer need to have an long delay in
the AUX transfer function. It's up to the panel code to make sure that
the panel is powered now. If someone tried to call the aux transfer
function without making sure the panel is powered we'll just get a
normal transfer failure.

We'll still keep the wait for HPD in the pre_enable() function. Though
it's probably not actually needed there, this driver is used in the
old mode (pre-DP AUX Endpoints) and it may be important for those
cases. If nothing else, it shouldn't cause any big problems.

NOTE: When handling the timeout for HPD we start the timer _after_
we've runtime resumed the device. This is definitely important for the
panel on my homestar which comes up 170 ms after we start timing (the
panel specifies 200 ms max). It's a little unclear how much of this
extra time is due to some internal state machine in the parade
firmware vs. debouncing but it seems to work for the two test cases I
have to do it this way.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220614145327.v4.4.Ie827321ce263be52fdb8c1276f6f8cc00d78029f@changeid
drivers/gpu/drm/bridge/parade-ps8640.c