drm/gma500: Renaming DP training vswing pre emph defines
Rename the defines to have levels instead of values for vswing and pre-emph levels as the values may differ in other scenarios like low vswing of eDP1.4 where the values are different. Done using following cocci patch for each define: @@ @@ # define DP_TRAIN_VOLTAGE_SWING_400 (0 << 0) + # define DP_TRAIN_VOLTAGE_SWING_LEVEL_0 (0 << 0) ... Signed-off-by: Sonika Jindal <sonika.jindal@intel.com> Acked-by: Dave Airlie <airlied@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
0ded925435
commit
31160006f8
|
@ -1089,7 +1089,7 @@ static char *link_train_names[] = {
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CDV_DP_VOLTAGE_MAX DP_TRAIN_VOLTAGE_SWING_1200
|
#define CDV_DP_VOLTAGE_MAX DP_TRAIN_VOLTAGE_SWING_LEVEL_3
|
||||||
/*
|
/*
|
||||||
static uint8_t
|
static uint8_t
|
||||||
cdv_intel_dp_pre_emphasis_max(uint8_t voltage_swing)
|
cdv_intel_dp_pre_emphasis_max(uint8_t voltage_swing)
|
||||||
|
@ -1276,7 +1276,7 @@ cdv_intel_dp_set_vswing_premph(struct gma_encoder *encoder, uint8_t signal_level
|
||||||
cdv_sb_write(dev, ddi_reg->VSwing2, dp_vswing_premph_table[index]);
|
cdv_sb_write(dev, ddi_reg->VSwing2, dp_vswing_premph_table[index]);
|
||||||
|
|
||||||
/* ;gfx_dpio_set_reg(0x814c, 0x40802040) */
|
/* ;gfx_dpio_set_reg(0x814c, 0x40802040) */
|
||||||
if ((vswing + premph) == DP_TRAIN_VOLTAGE_SWING_1200)
|
if ((vswing + premph) == DP_TRAIN_VOLTAGE_SWING_LEVEL_3)
|
||||||
cdv_sb_write(dev, ddi_reg->VSwing3, 0x70802040);
|
cdv_sb_write(dev, ddi_reg->VSwing3, 0x70802040);
|
||||||
else
|
else
|
||||||
cdv_sb_write(dev, ddi_reg->VSwing3, 0x40802040);
|
cdv_sb_write(dev, ddi_reg->VSwing3, 0x40802040);
|
||||||
|
|
|
@ -116,30 +116,30 @@ parse_edp(struct drm_psb_private *dev_priv, struct bdb_header *bdb)
|
||||||
|
|
||||||
switch (edp_link_params->preemphasis) {
|
switch (edp_link_params->preemphasis) {
|
||||||
case 0:
|
case 0:
|
||||||
dev_priv->edp.preemphasis = DP_TRAIN_PRE_EMPHASIS_0;
|
dev_priv->edp.preemphasis = DP_TRAIN_PRE_EMPH_LEVEL_0;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
dev_priv->edp.preemphasis = DP_TRAIN_PRE_EMPHASIS_3_5;
|
dev_priv->edp.preemphasis = DP_TRAIN_PRE_EMPH_LEVEL_1;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
dev_priv->edp.preemphasis = DP_TRAIN_PRE_EMPHASIS_6;
|
dev_priv->edp.preemphasis = DP_TRAIN_PRE_EMPH_LEVEL_2;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
dev_priv->edp.preemphasis = DP_TRAIN_PRE_EMPHASIS_9_5;
|
dev_priv->edp.preemphasis = DP_TRAIN_PRE_EMPH_LEVEL_3;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch (edp_link_params->vswing) {
|
switch (edp_link_params->vswing) {
|
||||||
case 0:
|
case 0:
|
||||||
dev_priv->edp.vswing = DP_TRAIN_VOLTAGE_SWING_400;
|
dev_priv->edp.vswing = DP_TRAIN_VOLTAGE_SWING_LEVEL_0;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
dev_priv->edp.vswing = DP_TRAIN_VOLTAGE_SWING_600;
|
dev_priv->edp.vswing = DP_TRAIN_VOLTAGE_SWING_LEVEL_1;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
dev_priv->edp.vswing = DP_TRAIN_VOLTAGE_SWING_800;
|
dev_priv->edp.vswing = DP_TRAIN_VOLTAGE_SWING_LEVEL_2;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
dev_priv->edp.vswing = DP_TRAIN_VOLTAGE_SWING_1200;
|
dev_priv->edp.vswing = DP_TRAIN_VOLTAGE_SWING_LEVEL_3;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
DRM_DEBUG_KMS("VBT reports EDP: VSwing %d, Preemph %d\n",
|
DRM_DEBUG_KMS("VBT reports EDP: VSwing %d, Preemph %d\n",
|
||||||
|
|
Loading…
Reference in New Issue