drm/i915: move edp low vswing config to vbt data
Move all data initialized from VBT under dev_priv->vbt. No functional changes. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1458834623-8734-3-git-send-email-jani.nikula@intel.com
This commit is contained in:
parent
6aa23e658d
commit
06411f08b3
|
@ -1451,6 +1451,7 @@ struct intel_vbt_data {
|
||||||
int lanes;
|
int lanes;
|
||||||
int preemphasis;
|
int preemphasis;
|
||||||
int vswing;
|
int vswing;
|
||||||
|
bool low_vswing;
|
||||||
bool initialized;
|
bool initialized;
|
||||||
bool support;
|
bool support;
|
||||||
int bpp;
|
int bpp;
|
||||||
|
@ -1963,8 +1964,6 @@ struct drm_i915_private {
|
||||||
|
|
||||||
struct intel_context *kernel_context;
|
struct intel_context *kernel_context;
|
||||||
|
|
||||||
bool edp_low_vswing;
|
|
||||||
|
|
||||||
/* perform PHY state sanity checks? */
|
/* perform PHY state sanity checks? */
|
||||||
bool chv_phy_assert[2];
|
bool chv_phy_assert[2];
|
||||||
|
|
||||||
|
|
|
@ -647,10 +647,10 @@ parse_edp(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)
|
||||||
|
|
||||||
/* Don't read from VBT if module parameter has valid value*/
|
/* Don't read from VBT if module parameter has valid value*/
|
||||||
if (i915.edp_vswing) {
|
if (i915.edp_vswing) {
|
||||||
dev_priv->edp_low_vswing = i915.edp_vswing == 1;
|
dev_priv->vbt.edp.low_vswing = i915.edp_vswing == 1;
|
||||||
} else {
|
} else {
|
||||||
vswing = (edp->edp_vswing_preemph >> (panel_type * 4)) & 0xF;
|
vswing = (edp->edp_vswing_preemph >> (panel_type * 4)) & 0xF;
|
||||||
dev_priv->edp_low_vswing = vswing == 0;
|
dev_priv->vbt.edp.low_vswing = vswing == 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -360,7 +360,7 @@ skl_get_buf_trans_dp(struct drm_i915_private *dev_priv, int *n_entries)
|
||||||
static const struct ddi_buf_trans *
|
static const struct ddi_buf_trans *
|
||||||
skl_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries)
|
skl_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries)
|
||||||
{
|
{
|
||||||
if (dev_priv->edp_low_vswing) {
|
if (dev_priv->vbt.edp.low_vswing) {
|
||||||
if (IS_SKL_ULX(dev_priv) || IS_KBL_ULX(dev_priv)) {
|
if (IS_SKL_ULX(dev_priv) || IS_KBL_ULX(dev_priv)) {
|
||||||
*n_entries = ARRAY_SIZE(skl_y_ddi_translations_edp);
|
*n_entries = ARRAY_SIZE(skl_y_ddi_translations_edp);
|
||||||
return skl_y_ddi_translations_edp;
|
return skl_y_ddi_translations_edp;
|
||||||
|
@ -1431,7 +1431,7 @@ static void bxt_ddi_vswing_sequence(struct drm_i915_private *dev_priv,
|
||||||
u32 n_entries, i;
|
u32 n_entries, i;
|
||||||
uint32_t val;
|
uint32_t val;
|
||||||
|
|
||||||
if (type == INTEL_OUTPUT_EDP && dev_priv->edp_low_vswing) {
|
if (type == INTEL_OUTPUT_EDP && dev_priv->vbt.edp.low_vswing) {
|
||||||
n_entries = ARRAY_SIZE(bxt_ddi_translations_edp);
|
n_entries = ARRAY_SIZE(bxt_ddi_translations_edp);
|
||||||
ddi_translations = bxt_ddi_translations_edp;
|
ddi_translations = bxt_ddi_translations_edp;
|
||||||
} else if (type == INTEL_OUTPUT_DISPLAYPORT
|
} else if (type == INTEL_OUTPUT_DISPLAYPORT
|
||||||
|
|
|
@ -3157,7 +3157,7 @@ intel_dp_voltage_max(struct intel_dp *intel_dp)
|
||||||
if (IS_BROXTON(dev))
|
if (IS_BROXTON(dev))
|
||||||
return DP_TRAIN_VOLTAGE_SWING_LEVEL_3;
|
return DP_TRAIN_VOLTAGE_SWING_LEVEL_3;
|
||||||
else if (INTEL_INFO(dev)->gen >= 9) {
|
else if (INTEL_INFO(dev)->gen >= 9) {
|
||||||
if (dev_priv->edp_low_vswing && port == PORT_A)
|
if (dev_priv->vbt.edp.low_vswing && port == PORT_A)
|
||||||
return DP_TRAIN_VOLTAGE_SWING_LEVEL_3;
|
return DP_TRAIN_VOLTAGE_SWING_LEVEL_3;
|
||||||
return DP_TRAIN_VOLTAGE_SWING_LEVEL_2;
|
return DP_TRAIN_VOLTAGE_SWING_LEVEL_2;
|
||||||
} else if (IS_VALLEYVIEW(dev) || IS_CHERRYVIEW(dev))
|
} else if (IS_VALLEYVIEW(dev) || IS_CHERRYVIEW(dev))
|
||||||
|
|
Loading…
Reference in a new issue