summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/msm/dp/dp_ctrl.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2022-12-22 11:11:48 +0300
committerTakashi Iwai <tiwai@suse.de>2022-12-22 11:11:48 +0300
commit2d78eb0342dd2c9c5cde9ae9ada1d33f189a858b (patch)
treef711bc9cab45f4963e4883ef15ff4c54a6cbc12e /drivers/gpu/drm/msm/dp/dp_ctrl.c
parentb47068b4aa53a57552398e3f60d0ed1918700c2b (diff)
parentee0b089d660021792e4ab4dda191b097ce1e964f (diff)
downloadlinux-2d78eb0342dd2c9c5cde9ae9ada1d33f189a858b.tar.xz
Merge branch 'for-next' into for-linus
Diffstat (limited to 'drivers/gpu/drm/msm/dp/dp_ctrl.c')
-rw-r--r--drivers/gpu/drm/msm/dp/dp_ctrl.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c
index 3854c9f1f7e9..dd26ca651a05 100644
--- a/drivers/gpu/drm/msm/dp/dp_ctrl.c
+++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c
@@ -1243,8 +1243,7 @@ static int dp_ctrl_link_train(struct dp_ctrl_private *ctrl,
{
int ret = 0;
const u8 *dpcd = ctrl->panel->dpcd;
- u8 encoding = DP_SET_ANSI_8B10B;
- u8 ssc;
+ u8 encoding[] = { 0, DP_SET_ANSI_8B10B };
u8 assr;
struct dp_link_info link_info = {0};
@@ -1256,13 +1255,11 @@ static int dp_ctrl_link_train(struct dp_ctrl_private *ctrl,
dp_aux_link_configure(ctrl->aux, &link_info);
- if (drm_dp_max_downspread(dpcd)) {
- ssc = DP_SPREAD_AMP_0_5;
- drm_dp_dpcd_write(ctrl->aux, DP_DOWNSPREAD_CTRL, &ssc, 1);
- }
+ if (drm_dp_max_downspread(dpcd))
+ encoding[0] |= DP_SPREAD_AMP_0_5;
- drm_dp_dpcd_write(ctrl->aux, DP_MAIN_LINK_CHANNEL_CODING_SET,
- &encoding, 1);
+ /* config DOWNSPREAD_CTRL and MAIN_LINK_CHANNEL_CODING_SET */
+ drm_dp_dpcd_write(ctrl->aux, DP_DOWNSPREAD_CTRL, encoding, 2);
if (drm_dp_alternate_scrambler_reset_cap(dpcd)) {
assr = DP_ALTERNATE_SCRAMBLER_RESET_ENABLE;