Commit 01a60883 authored by Jani Nikula's avatar Jani Nikula

drm/i915/bios: intel_bios_hdmi_boost_level()

Don't access i915->vbt.ddi_port_info[] directly.
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/6d61a5bc60c995d2ee812ef61d3c5c93b61453e7.1579270868.git.jani.nikula@intel.com
parent 605a1872
...@@ -2585,3 +2585,10 @@ int intel_bios_dp_boost_level(struct intel_encoder *encoder) ...@@ -2585,3 +2585,10 @@ int intel_bios_dp_boost_level(struct intel_encoder *encoder)
return i915->vbt.ddi_port_info[encoder->port].dp_boost_level; return i915->vbt.ddi_port_info[encoder->port].dp_boost_level;
} }
int intel_bios_hdmi_boost_level(struct intel_encoder *encoder)
{
struct drm_i915_private *i915 = to_i915(encoder->base.dev);
return i915->vbt.ddi_port_info[encoder->port].hdmi_boost_level;
}
...@@ -250,5 +250,6 @@ bool intel_bios_get_dsc_params(struct intel_encoder *encoder, ...@@ -250,5 +250,6 @@ bool intel_bios_get_dsc_params(struct intel_encoder *encoder,
int intel_bios_max_tmds_clock(struct intel_encoder *encoder); int intel_bios_max_tmds_clock(struct intel_encoder *encoder);
int intel_bios_hdmi_level_shift(struct intel_encoder *encoder); int intel_bios_hdmi_level_shift(struct intel_encoder *encoder);
int intel_bios_dp_boost_level(struct intel_encoder *encoder); int intel_bios_dp_boost_level(struct intel_encoder *encoder);
int intel_bios_hdmi_boost_level(struct intel_encoder *encoder);
#endif /* _INTEL_BIOS_H_ */ #endif /* _INTEL_BIOS_H_ */
...@@ -1055,8 +1055,7 @@ static void intel_prepare_hdmi_ddi_buffers(struct intel_encoder *encoder, ...@@ -1055,8 +1055,7 @@ static void intel_prepare_hdmi_ddi_buffers(struct intel_encoder *encoder,
level = n_entries - 1; level = n_entries - 1;
/* If we're boosting the current, set bit 31 of trans1 */ /* If we're boosting the current, set bit 31 of trans1 */
if (IS_GEN9_BC(dev_priv) && if (IS_GEN9_BC(dev_priv) && intel_bios_hdmi_boost_level(encoder))
dev_priv->vbt.ddi_port_info[port].hdmi_boost_level)
iboost_bit = DDI_BUF_BALANCE_LEG_ENABLE; iboost_bit = DDI_BUF_BALANCE_LEG_ENABLE;
/* Entry 9 is for HDMI: */ /* Entry 9 is for HDMI: */
...@@ -2341,7 +2340,7 @@ static void skl_ddi_set_iboost(struct intel_encoder *encoder, ...@@ -2341,7 +2340,7 @@ static void skl_ddi_set_iboost(struct intel_encoder *encoder,
u8 iboost; u8 iboost;
if (type == INTEL_OUTPUT_HDMI) if (type == INTEL_OUTPUT_HDMI)
iboost = dev_priv->vbt.ddi_port_info[port].hdmi_boost_level; iboost = intel_bios_hdmi_boost_level(encoder);
else else
iboost = intel_bios_dp_boost_level(encoder); iboost = intel_bios_dp_boost_level(encoder);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment