Patch "drm/i915: Program iboost settings for HDMI/DVI on SKL" has been added to the 4.7-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
drm/i915: Program iboost settings for HDMI/DVI on SKL
to the 4.7-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-i915-program-iboost-settings-for-hdmi-dvi-on-skl.patch
and it can be found in the queue-4.7 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
7ff9a55614712adf13ce7990565be0263e620f5eMon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <[email protected]>
Date: Tue, 12 Jul 2016 15:59:30 +0300
Subject: drm/i915: Program iboost settings for HDMI/DVI on SKL
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Ville Syrjälä <[email protected]>
commit 7ff9a55614712adf13ce7990565be0263e620f5e upstream.
Currently we fail to program the iboost stuff for HDMI/DVI. Let's remedy that.
--- drivers/gpu/drm/i915/intel_ddi.c | 51 ++++++++++++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +40 -11
@@ -388,6 +388,40 @@ skl_get_buf_trans_hdmi(struct drm_i915_p } } +static int intel_ddi_hdmi_level (struct drm_i915_private *dev_priv,enum port port) +{ +int n_hdmi_entries; +int hdmi_level; +int hdmi_default_entry; + + hdmi_level = dev_priv->vbt.ddi_port_info[port].hdmi_level_shift; + +if (IS_BROXTON (dev_priv)) +return hdmi_level; + +if (IS_SKYLAKE (dev_priv) ||IS_KABYLAKE (dev_priv)) { +skl_get_buf_trans_hdmi (dev_priv, &n_hdmi_entries); + hdmi_default_entry =8 ; + }else if (IS_BROADWELL (dev_priv)) { + n_hdmi_entries =ARRAY_SIZE (bdw_ddi_translations_hdmi); + hdmi_default_entry =7 ; + }else if (IS_HASWELL (dev_priv)) { + n_hdmi_entries =ARRAY_SIZE (hsw_ddi_translations_hdmi); + hdmi_default_entry =6 ; + }else { +WARN (1 ,"ddi translation table missing\n" ); + n_hdmi_entries =ARRAY_SIZE (bdw_ddi_translations_hdmi); + hdmi_default_entry =7 ; + } + +/* Choose a good default if VBT is badly populated */ +if (hdmi_level ==HDMI_LEVEL_SHIFT_UNKNOWN || + hdmi_level >= n_hdmi_entries) + hdmi_level = hdmi_default_entry; + +return hdmi_level; +} +/* * Starting with Haswell, DDI port buffers must be programmed with correct * values in advance. The buffer values are different for FDI and DP modes,
@@ -399,7 +433,7 @@ void intel_prepare_ddi_buffer(struct int {struct drm_i915_private *dev_priv =to_i915 (encoder->base.dev);u32 iboost_bit =0 ; -int i, n_hdmi_entries, n_dp_entries, n_edp_entries, hdmi_default_entry, +int i, n_hdmi_entries, n_dp_entries, n_edp_entries, size;int hdmi_level;enum port port;
@@ -410,7 +444,7 @@ void intel_prepare_ddi_buffer(struct intconst struct ddi_buf_trans *ddi_translations; port =intel_ddi_get_encoder_port (encoder); - hdmi_level = dev_priv->vbt.ddi_port_info[port].hdmi_level_shift; + hdmi_level =intel_ddi_hdmi_level (dev_priv, port);if (IS_BROXTON (dev_priv)) {if (encoder->type !=INTEL_OUTPUT_HDMI )
@@ -430,7 +464,6 @@ void intel_prepare_ddi_buffer(struct intskl_get_buf_trans_edp (dev_priv, &n_edp_entries); ddi_translations_hdmi =skl_get_buf_trans_hdmi (dev_priv, &n_hdmi_entries); - hdmi_default_entry =8 ;/* If we're boosting the current, set bit 31 of trans1 */ if (dev_priv->vbt.ddi_port_info[port].hdmi_boost_level || dev_priv->vbt.ddi_port_info[port].dp_boost_level)
@@ -456,7 +489,6 @@ void intel_prepare_ddi_buffer(struct int n_dp_entries =ARRAY_SIZE (bdw_ddi_translations_dp); n_hdmi_entries =ARRAY_SIZE (bdw_ddi_translations_hdmi); - hdmi_default_entry =7 ; }else if (IS_HASWELL (dev_priv)) { ddi_translations_fdi = hsw_ddi_translations_fdi; ddi_translations_dp = hsw_ddi_translations_dp;
@@ -464,7 +496,6 @@ void intel_prepare_ddi_buffer(struct int ddi_translations_hdmi = hsw_ddi_translations_hdmi; n_dp_entries = n_edp_entries =ARRAY_SIZE (hsw_ddi_translations_dp); n_hdmi_entries =ARRAY_SIZE (hsw_ddi_translations_hdmi); - hdmi_default_entry =6 ; }else {WARN (1 ,"ddi translation table missing\n" ); ddi_translations_edp = bdw_ddi_translations_dp;
@@ -474,7 +505,6 @@ void intel_prepare_ddi_buffer(struct int n_edp_entries =ARRAY_SIZE (bdw_ddi_translations_edp); n_dp_entries =ARRAY_SIZE (bdw_ddi_translations_dp); n_hdmi_entries =ARRAY_SIZE (bdw_ddi_translations_hdmi); - hdmi_default_entry =7 ; }switch (encoder->type) {
@@ -505,11 +535,6 @@ void intel_prepare_ddi_buffer(struct intif (encoder->type !=INTEL_OUTPUT_HDMI )return ; -/* Choose a good default if VBT is badly populated */ -if (hdmi_level ==HDMI_LEVEL_SHIFT_UNKNOWN || - hdmi_level >= n_hdmi_entries) - hdmi_level = hdmi_default_entry; -/* Entry 9 is for HDMI: */ I915_WRITE (DDI_BUF_TRANS_LO (port, i), ddi_translations_hdmi[hdmi_level].trans1 | iboost_bit);
@@ -1639,6 +1664,10 @@ static void intel_ddi_pre_enable(structintel_dp_stop_link_train (intel_dp); }else if (type ==INTEL_OUTPUT_HDMI ) {struct intel_hdmi *intel_hdmi =enc_to_intel_hdmi (encoder); +int level =intel_ddi_hdmi_level (dev_priv, port); + +if (IS_SKYLAKE (dev_priv) ||IS_KABYLAKE (dev_priv)) +skl_ddi_set_iboost (intel_encoder, level); intel_hdmi->set_infoframes(encoder, crtc->config->has_hdmi_sink,
Patches currently in stable-queue which might be from [email protected] are
queue-4.7/drm-i915-fix-iboost-setting-for-skl-y-u-dp-ddi-buffer-translation-entry-2.patch queue-4.7/drm-i915-fix-iboost-setting-for-ddi-with-4-lanes-on-skl.patch queue-4.7/drm-i915-vlv-make-intel_crt_reset-per-encoder.patch queue-4.7/drm-i915-program-iboost-settings-for-hdmi-dvi-on-skl.patch queue-4.7/drm-i915-vlv-reset-the-adpa-in-vlv_display_power_well_init.patch queue-4.7/drm-i915-enable-polling-when-we-don-t-have-hpd.patch queue-4.7/drm-i915-vlv-disable-hpd-in-valleyview_crt_detect_hotplug.patch