Hi, On Mon, Mar 10, 2025 at 3:42 AM Damon Ding <damon.ding@xxxxxxxxxxxxxx> wrote: > > Add analogix_dpaux_wait_hpd_asserted() to help confirm the HPD state > before doing AUX transfers. > > Signed-off-by: Damon Ding <damon.ding@xxxxxxxxxxxxxx> > --- > .../drm/bridge/analogix/analogix_dp_core.c | 21 +++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > index 2b76a9cf3bcb..b7e143b3ff75 100644 > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > @@ -1548,6 +1548,26 @@ static ssize_t analogix_dpaux_transfer(struct drm_dp_aux *aux, > return ret; > } > > +static int analogix_dpaux_wait_hpd_asserted(struct drm_dp_aux *aux, unsigned long wait_us) > +{ > + struct analogix_dp_device *dp = to_dp(aux); > + int val; > + int ret; > + > + if (dp->force_hpd) > + return 0; As mentioned previously [1], it's _possible_ that this should have a delay like we had in sn65dsi86, though maybe that was to deal with legacy device trees? It's been a while. Oh, I remember. It's because even if HPD was hooked up to the controller like it's supposed to be we don't actually implement HPD in the driver for the eDP controller (long story). ...so we worked around that with a delay. Right, so your code looks correct. :-) [1] https://lore.kernel.org/r/CAD=FV=WoigDDTG6wTK0smsxASVfK5BzzW6KNpKWq97v4GAgvmw@xxxxxxxxxxxxxx Reviewed-by: Douglas Anderson <dianders@xxxxxxxxxxxx>