Re: [PATCH v6 09/10] drm/msm/dp: turn link_ready into plugged
From: Dmitry Baryshkov
Date: Tue May 26 2026 - 01:46:14 EST
On Mon, May 25, 2026 at 04:01:23PM +0200, Konrad Dybcio wrote:
> On 5/24/26 12:33 PM, Dmitry Baryshkov wrote:
> > Tracking when the DP link is ready isn't that useful from the driver
> > point of view. It doesn't provide a direct information if the device
> > should be suspended, etc. Replace it with the 'plugged' boolean, which
> > is set when the driver knows that there is DPRX plugged.
> >
> > Tested-by: Val Packett <val@xxxxxxxxxxxx> # x1e80100-dell-latitude-7455
> > Tested-by: Yongxing Mou <yongxing.mou@xxxxxxxxxxxxxxxx> # Hamoa IOT EVK, QCS8300 Ride
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
> > ---
>
> [...]
>
> > -static void msm_dp_display_host_phy_init(struct msm_dp_display_private *dp)
> > +/**
> > + * msm_dp_display_host_phy_init() - start up DP PHY
> > + * @dp: main display data structure
> > + *
> > + * Prepare DP PHY for the AUX transactions to succeed.
> > + *
> > + * Returns: true if this call has initliazed the PHY and false if the PHY has
> > + * already been setup beforehand.
>
> This assumes no failure. I hope adding various return-value checks across
> this driver is somewhere on the todolist..
>
> [...]
>
> > end:
> > - pm_runtime_put_sync(&dp->pdev->dev);
> > + /*
> > + * If we detected the DPRX, leave the controller on so that it doesn't
> > + * loose the state.
>
> "lose"
>
> That is done.. presumably so that one could correct a coredump or similar?
No. It is exactly as written: to keep the DPTX state. Otherwise the HPD
state machine will be reset, DPTX won't be able to respond to the HPD
pulses from the branch device, when the anything gets plugged into it,
etc.
>
> Konrad
--
With best wishes
Dmitry