linux/drivers/gpu/drm/bridge/analogix
Damon Ding 6bb8898f70 drm/bridge: analogix_dp: Fix PE/VS value shift mismatch during link training
VS/PE values returned by drm_dp_get_adjust_request_voltage() and
drm_dp_get_adjust_request_pre_emphasis() are already encoded to their
native DPCD register bit positions. However, DPCD_VOLTAGE_SWING_SET /
DPCD_PRE_EMPHASIS_SET macros perform an extra internal shift. Feeding
the raw offset-bearing values directly leads to overlapping bitfields
and invalid lane training configuration, causing link training failures
and black screen.

Add right shift using DP_TRAIN_*_SHIFT constants to strip the DPCD bit
offsets before passing values to the SET macros and subsequent checks.
Apply this fix for both clock recovery and adjust training code paths.

Reported-by: Vicente Bergas <vicencb@gmail.com>
Closes: https://lore.kernel.org/all/CAAMcf8D-d+5n=H44KeKBSqWY42m+o32W+mO-r15VqWNyYhJL7Q@mail.gmail.com/
Fixes: d84b087c76 ("drm/bridge: analogix_dp: Apply DP helper APIs to get adjusted voltages and pre-emphasises")
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Link: https://lore.kernel.org/all/CAAMcf8D-d+5n=H44KeKBSqWY42m+o32W+mO-r15VqWNyYhJL7Q@mail.gmail.com/
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20260623023506.309858-1-damon.ding@rock-chips.com
2026-07-03 18:48:02 +02:00
..
analogix_dp_core.c drm/bridge: analogix_dp: Fix PE/VS value shift mismatch during link training 2026-07-03 18:48:02 +02:00
analogix_dp_core.h drm/bridge: analogix_dp: Apply drm_bridge_connector helper 2026-04-13 17:16:21 +02:00
analogix_dp_reg.c drm/bridge: analogix_dp: Add support for phy configuration. 2025-04-21 01:26:06 +03:00
analogix_dp_reg.h drm/bridge: analogix_dp: handle AUX transfer timeouts 2024-06-27 11:52:19 +02:00
analogix-anx78xx.c drm: convert many bridge drivers from devm_kzalloc() to devm_drm_bridge_alloc() API 2025-05-23 15:03:47 +02:00
analogix-anx78xx.h drm/bridge: split some definitions of ANX78xx to dedicated headers 2019-11-08 10:27:32 +01:00
analogix-anx6345.c drm/bridge: analogix-anx6345: convert to devm_drm_bridge_alloc() API 2025-04-29 11:21:20 +02:00
analogix-i2c-dptx.c drm/bridge: Include <linux/export.h> 2025-06-16 09:02:25 +02:00
analogix-i2c-dptx.h drm/bridge: Prepare Analogix anx6345 support 2019-11-08 10:27:53 +01:00
analogix-i2c-txcommon.h drm/bridge: Prepare Analogix anx6345 support 2019-11-08 10:27:53 +01:00
anx7625.c workqueue: Changes for v7.2 2026-06-17 11:57:44 +01:00
anx7625.h drm: bridge: anx7625: implement message sending 2026-02-07 12:38:38 +02:00
Kconfig drm/bridge: analogix_dp: Add new API analogix_dp_finish_probe() 2026-04-13 17:42:30 +02:00
Makefile drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP 2020-10-16 23:35:16 +02:00