linux/drivers/gpu/drm/msm/dp
William Bright 58995b11df drm/msm/dp: fix link bandwidth check when wide bus is enabled
msm_dp_display_mode_valid() halves the pixel clock when either YUV420 or
wide bus is in use, then uses that halved value both for the controller
pixel clock limit and for the DP link bandwidth check.

Only YUV420 halves the data crossing the link. Wide bus widens the
internal DPU to DP interface to two pixels per clock, halving the
controller clock. Every pixel is still transmitted, so the link
bandwidth requirement remains.

As a result, modes needing up to twice the available link bandwidth pass
validation. On the IMDT QCS8550 SBC (rev5 with CYPD6125), where DP runs
over USB-C alt mode where only two lanes are available, 3840x2160@60 was
accepted despite needing 9.6 Gbps against the 8.64 Gbps the link can
carry.

Use a separate link pixel clock that is only halved for YUV420 for the
bandwidth calculation, leaving the wide bus halving to apply solely to
the controller pixel clock limit. With this, 4k@60 is correctly rejected
and 4k@30 selected instead.

Fixes: df9cf852ca ("drm/msm/dp: account for widebus and yuv420 during mode validation")
Assisted-by: Claude:claude-opus-5
Signed-off-by: William Bright <william.bright@imd-tec.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/746145/
Link: https://lore.kernel.org/r/20260812-msm-dp-link-bw-v1-1-b0e3ce1190be@imd-tec.com
[DB: dropped useless comment]
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
2026-09-14 00:24:21 +03:00
..
dp_audio.c drm/msm/dp: return 0 from audio_prepare when cable is disconnected 2026-07-31 16:35:32 +03:00
dp_audio.h drm/bridge: Make dp/hdmi_audio_* callback keep the same paramter order with get_modes 2025-07-14 18:23:18 +03:00
dp_aux.c drm/msm/dp: drop the msm_dp_catalog module 2025-07-04 16:35:19 +03:00
dp_aux.h drm/msm/dp: drop the msm_dp_catalog module 2025-07-04 16:35:19 +03:00
dp_ctrl.c drm/msm/dp: Drop dev_pm_opp_set_rate(0) 2026-07-31 17:08:01 +03:00
dp_ctrl.h drm/msm/dp: split dp_ctrl_off() into stream and link parts 2026-07-31 17:08:01 +03:00
dp_debug.c drm/msm: make it possible to disable KMS-related code. 2025-07-05 07:13:35 -07:00
dp_debug.h drm/msm/dp: fix all kernel-doc warnings 2025-12-24 11:24:18 +02:00
dp_display.c drm/msm/dp: fix link bandwidth check when wide bus is enabled 2026-09-14 00:24:21 +03:00
dp_display.h drm/msm/dp: make bridge helpers use dp_display to allow re-use 2026-07-31 17:08:01 +03:00
dp_drm.c drm/msm/dp: make bridge helpers use dp_display to allow re-use 2026-07-31 17:08:01 +03:00
dp_drm.h drm/msm/dp: make bridge helpers use dp_display to allow re-use 2026-07-31 17:08:01 +03:00
dp_link.c drm/msm/dp: Add support for lane mapping configuration 2025-11-14 16:59:27 +02:00
dp_link.h drm/msm/dp: Enable support for eDP v1.4+ link rates table 2026-01-06 05:30:08 +02:00
dp_panel.c drm/msm/dp: move mode setup into msm_dp_panel_init_panel_info() 2026-07-31 17:08:00 +03:00
dp_panel.h drm/msm/dp: move mode setup into msm_dp_panel_init_panel_info() 2026-07-31 17:08:00 +03:00
dp_reg.h drm/msm/dp: split msm_dp_ctrl_config_ctrl() into link parts and stream parts 2026-07-31 17:08:00 +03:00
dp_utils.c drm/msm/dp: fix msm_dp_utils_pack_sdp_header interface 2024-12-02 18:41:42 -08:00
dp_utils.h drm/msm/dp: fix msm_dp_utils_pack_sdp_header interface 2024-12-02 18:41:42 -08:00