]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/hisilicon/hibmc: fix dp probabilistical detect errors after HPD irq
authorBaihan Li <libaihan@huawei.com>
Wed, 10 Dec 2025 02:37:56 +0000 (10:37 +0800)
committerDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Tue, 20 Jan 2026 08:53:14 +0000 (10:53 +0200)
commit3906e7a3b26d683868704fe262db443207f392fe
tree417ee6344402cf0f540b7ccd67ba6f7949711815
parent7d0507772406e129329983b8b807e5b499bd74fd
drm/hisilicon/hibmc: fix dp probabilistical detect errors after HPD irq

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@huawei.com>
Signed-off-by: Yongbang Shi <shiyongbang@huawei.com>
Reviewed-by: Tao Tian <tiantao6@hisilicon.com>
Link: https://patch.msgid.link/20251210023759.3944834-2-shiyongbang@huawei.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
drivers/gpu/drm/hisilicon/hibmc/dp/dp_comm.h
drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c
drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.h
drivers/gpu/drm/hisilicon/hibmc/dp/dp_reg.h
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_dp.c