Re: [PATCH v10 drm-dp 1/4] drm/hisilicon/hibmc: fix dp probabilistical detect errors after HPD irq

From: Dmitry Baryshkov

Date: Tue Jan 20 2026 - 03:51:56 EST


On Wed, Dec 10, 2025 at 10:37:56AM +0800, Yongbang Shi wrote:
> From: Baihan Li <libaihan@xxxxxxxxxx>
>
> The issue is that drm_connector_helper_detect_from_ddc() returns wrong
> status when plugging or unplugging the monitor, which may cause the link
> failed err.[0] Use HPD pin status in DP's detect_ctx() for real physical
> monitor in/out, and implement a complete DP detection including read DPCD,
> check if it's a branch device and its sink count for different situations.
>
> [0]:
> hibme-drm 0000:83:00.0: [drm] *ERROR* channel equalization failed 5 times
> hibme-drm 0000:83:00.0: [drm] *ERROR* channel equalization failed 5 times
> hibme-drm 0000:83:00.0: [drm] *ERROR* dp link training failed, ret: -16
> hibmc-drm 0000:83:00.0: [drm] *ERROR* hibme dp mode set failed: -16
>
> Fixes: 3c7623fb5bb6 ("drm/hisilicon/hibmc: Enable this hot plug detect of irq feature")
> Signed-off-by: Baihan Li <libaihan@xxxxxxxxxx>
> Signed-off-by: Yongbang Shi <shiyongbang@xxxxxxxxxx>
> Reviewed-by: Tao Tian <tiantao6@xxxxxxxxxxxxx>
> ---
> ChangeLog:
> v9 -> v10:
> - delete 100ms delay in hibmc_dp_check_hpd_status().
> - delete redundant checks in atomic_enable().
> v8 -> v9:
> - refactor the hibmc_dp_check_hpd_status(), and add some checks
> in dp_encoder_enable.
> v7 -> v8:
> - fix build errors reported by kernel test robot <lkp@xxxxxxxxx>
> Closes: https://lore.kernel.org/oe-kbuild-all/202509241625.o4mNleVb-lkp@xxxxxxxxx/
> v6 -> v7:
> - add the check about branch devices, suggested by Dmitry Baryshkov.
> v5 -> v6:
> - use HPD status in DP detect_ctx(), suggested by Dmitry Baryshkov.
> v4 -> v5:
> - fix the commit message and DP detect_ctx(), suggested by Dmitry Baryshkov.
> ---
> drivers/gpu/drm/hisilicon/hibmc/dp/dp_comm.h | 4 ++
> drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c | 19 +++++++
> drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h | 6 +++
> drivers/gpu/drm/hisilicon/hibmc/dp/dp_reg.h | 3 ++
> .../gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c | 52 +++++++++++++++++--
> 5 files changed, 80 insertions(+), 4 deletions(-)
>

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>


--
With best wishes
Dmitry