[PATCH v8 6/9] drm/msm/dp: don't take extra references on multiple plug events
Yongxing Mou
yongxing.mou at oss.qualcomm.com
Wed Nov 11 18:39:56 PST 2026
On 10/24/2026 8:35 AM, Dmitry Baryshkov wrote:
> The upper layers might signal multiple sequential HPD plug events. Don't
> take extra references and skip all further HPD plug events until we
> receive the unplug event.
>
> Fixes: 3ea2d1c3d154 ("drm/msm/dp: turn link_ready into plugged")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov at oss.qualcomm.com>
> ---
> drivers/gpu/drm/msm/dp/dp_display.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
> index fa8942922b53..ce919a26fba2 100644
> --- a/drivers/gpu/drm/msm/dp/dp_display.c
> +++ b/drivers/gpu/drm/msm/dp/dp_display.c
> @@ -412,6 +412,9 @@ static int msm_dp_hpd_plug_handle(struct msm_dp_display_private *dp)
>
> guard(mutex)(&dp->plugged_lock);
>
> + if (dp->plugged)
> + return 0;
> +
> ret = pm_runtime_resume_and_get(&pdev->dev);
> if (ret) {
> DRM_ERROR("failed to pm_runtime_resume\n");
>
Hi, the issue reported by the AI is real. There is a regression in the
SST case: when .detect() runs first, it sets plugged to true. As a
result, when msm_dp_hpd_plug_handle() is called,
msm_dp_display_process_hpd_high() is skipped, which causes the
subsequent failure.
I tried removing the plugged update from .detect(), and that fixes the
SST issue. The display works now. However, there is still an
intermittent issue where the wrong resolution is selected. I suspect
this is related to the timing of the EDID read: when fbcon comes up, the
correct EDID may not be available immediately.
More information about the linux-arm-kernel
mailing list