drm/bridge: Fixed a DP link training bug
authorxiazhengqiao <xiazhengqiao@huaqin.corp-partner.google.com>
Thu, 21 Dec 2023 09:30:57 +0000 (17:30 +0800)
committerRobert Foss <rfoss@kernel.org>
Tue, 9 Jan 2024 17:11:53 +0000 (18:11 +0100)
commitca077ff8cac5af8a5a3c476983a6dd54aa3511b7
tree2ee765cc6723e289d63af30a00e83e74d91b8249
parent219a1f49094f50bf9c382830d06149e677f76bed
drm/bridge: Fixed a DP link training bug

To have better compatibility for DP sink, there is a retry mechanism
for the link training process to switch between different training process.
The original driver code doesn't reset the retry counter when training
state is pass. If the system triggers link training over 3 times,
there will be a chance to causes the driver to use the wrong training
method and return a training fail result.

To Fix this, we reset the retry counter when training state is pass
each time.

Signed-off-by: Allen Chen <allen.chen@ite.corp-partner.google.com>
Signed-off-by: xiazhengqiao <xiazhengqiao@huaqin.corp-partner.google.com>
Reviewed-by: Robert Foss <rfoss@kernel.org>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20231221093057.7073-1-xiazhengqiao@huaqin.corp-partner.google.com
drivers/gpu/drm/bridge/ite-it6505.c