* [PATCH v2 0/1] Regression in analogix_anx78xx
@ 2020-03-08 15:22 Tobias Schramm
2020-03-08 15:22 ` [PATCH v2 1/1] drm/bridge: anx78xx: fix calculation of dp link rate Tobias Schramm
0 siblings, 1 reply; 2+ messages in thread
From: Tobias Schramm @ 2020-03-08 15:22 UTC (permalink / raw)
To: Andrzej Hajda, Neil Armstrong, Laurent Pinchart, Jonas Karlman,
Jernej Skrabec, David Airlie, Daniel Vetter
Cc: Brian Masney, Linus Walleij, Maxime Ripard, Icenowy Zheng,
Thomas Gleixner, Sam Ravnborg, Thierry Reding, dri-devel,
linux-kernel, Tobias Schramm
commit ff1e8fb68ea0 ("drm/bridge: analogix-anx78xx: Avoid drm_dp_link helpers")
stores the max link rate in a u8, overflowing it.
This will probably prevent the link training from working.
I've not tested this patch beyond a simple compile test since I do not own
any devices containing an anx78xx. So please test!
Best regards,
Tobias
Changelog:
v2: Skip forward and back conversion to/from link rate
Tobias Schramm (1):
drm/bridge: anx78xx: fix calculation of dp link rate
drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--
2.24.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH v2 1/1] drm/bridge: anx78xx: fix calculation of dp link rate
2020-03-08 15:22 [PATCH v2 0/1] Regression in analogix_anx78xx Tobias Schramm
@ 2020-03-08 15:22 ` Tobias Schramm
0 siblings, 0 replies; 2+ messages in thread
From: Tobias Schramm @ 2020-03-08 15:22 UTC (permalink / raw)
To: Andrzej Hajda, Neil Armstrong, Laurent Pinchart, Jonas Karlman,
Jernej Skrabec, David Airlie, Daniel Vetter
Cc: Brian Masney, Linus Walleij, Maxime Ripard, Icenowy Zheng,
Thomas Gleixner, Sam Ravnborg, Thierry Reding, dri-devel,
linux-kernel, Tobias Schramm
commit ff1e8fb68ea0 ("drm/bridge: analogix-anx78xx: Avoid drm_dp_link helpers")
changed the link training logic to remove use of drm_dp_link helpers.
However the new logic stores the maximum link rate in a u8, overflowing
it.
This commit changes the logic to store the bw code directly, avoiding any
overflows.
Fixes: ff1e8fb68ea0 ("drm/bridge: analogix-anx78xx: Avoid drm_dp_link helpers")
Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
---
drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c b/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c
index 41867be03751..0c6b049b5753 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c
@@ -722,8 +722,7 @@ static int anx78xx_dp_link_training(struct anx78xx *anx78xx)
if (err)
return err;
- dpcd[0] = drm_dp_max_link_rate(anx78xx->dpcd);
- dpcd[0] = drm_dp_link_rate_to_bw_code(dpcd[0]);
+ dpcd[0] = anx78xx->dpcd[DP_MAX_LINK_RATE];
err = regmap_write(anx78xx->map[I2C_IDX_TX_P0],
SP_DP_MAIN_LINK_BW_SET_REG, dpcd[0]);
if (err)
--
2.24.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-08 15:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-08 15:22 [PATCH v2 0/1] Regression in analogix_anx78xx Tobias Schramm
2020-03-08 15:22 ` [PATCH v2 1/1] drm/bridge: anx78xx: fix calculation of dp link rate Tobias Schramm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).