mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
drm/bridge: analogix_dp: Reuse &link_train.training_lane[] to set DPCD DP_TRAINING_LANEx_SET
In analogix_dp_link_start(), &link_train.training_lane[] is used to set phy PE/VS configurations, and buf[] is initialized with the same values to set DPCD DP_TRAINING_LANEx_SET. It makes sense to reuse &link_train.training_lane[] to set DPCD DP_TRAINING_LANEx_SET, which can remove the redundant assignments and make codes more consice. Change-Id: I38869c22f8cc93b18b3b27bc41a0975700b328d1 Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
This commit is contained in:
@@ -449,11 +449,7 @@ static int analogix_dp_link_start(struct analogix_dp_device *dp)
|
||||
if (retval < 0)
|
||||
return retval;
|
||||
|
||||
for (lane = 0; lane < lane_count; lane++)
|
||||
buf[lane] = DP_TRAIN_PRE_EMPH_LEVEL_0 |
|
||||
DP_TRAIN_VOLTAGE_SWING_LEVEL_0;
|
||||
|
||||
retval = drm_dp_dpcd_write(&dp->aux, DP_TRAINING_LANE0_SET, buf,
|
||||
retval = drm_dp_dpcd_write(&dp->aux, DP_TRAINING_LANE0_SET, dp->link_train.training_lane,
|
||||
lane_count);
|
||||
if (retval < 0)
|
||||
return retval;
|
||||
|
||||
Reference in New Issue
Block a user