drm/bridge: analogix-anx78xx: Fix drm_dp_link helper removal
Subsystems (3)
PATCH RESEND 1/1 drm/bridge: analogix-anx78xx: Fix drm_dp_link helper removal
drm_dp_link_rate_to_bw_code and ...bw_code_to_link_rate simply divide by and multiply with 27000, respectively. Avoid an overflow in the u8 dpcd[0] and the multiply+divide alltogether.
---
https://patchwork.freedesktop.org/patch/343003/ (dropped the review mark)
https://lists.freedesktop.org/archives/dri-devel/2020-January/253535.html
---
drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c +2 -3
@@ -722,10 +722,9 @@ 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 ]); err =regmap_write (anx78xx->map[I2C_IDX_TX_P0 ], -SP_DP_MAIN_LINK_BW_SET_REG , dpcd[0 ]); +SP_DP_MAIN_LINK_BW_SET_REG , + anx78xx->dpcd[DP_MAX_LINK_RATE ]);if (err)return err;
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 6 lines · Torsten Duwe
drm_dp_link_rate_to_bw_codeand ...bw_code_to_link_rate simply divide by and multiply with 27000, respectively. Avoid an overflow in the u8 dpcd[0] and the multiply+divide alltogether.Fixes ff1e8fb68ea06027 ("analogix-anx78xx: Avoid drm_dp_link helpers")Signed-off-by Torsten Duwe <[email protected]>
Since same company I'm assuming Thomas Zimmermann will take care of these patches for you. Or you need to ping maintainers again to push these for you.
Also if you expect to regularlay contribut drm patches, just ask for commit rights after 5-10 patches landed.
Cheers, Daniel
Quoted 23 lines
Reviewed-by Thierry Reding <[email protected]>---
https://patchwork.freedesktop.org/patch/343003/ (dropped the review mark)
https://lists.freedesktop.org/archives/dri-devel/2020-January/253535.html---
drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c +2
-3@@ -722,10 +722,9 @@ 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 ]); err =regmap_write (anx78xx->map[I2C_IDX_TX_P0 ], -SP_DP_MAIN_LINK_BW_SET_REG , dpcd[0 ]); +SP_DP_MAIN_LINK_BW_SET_REG , + anx78xx->dpcd[DP_MAX_LINK_RATE ]);if (err)return err;
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel