diff mbox

[v3] drm/i915: Fix eDP low vswing for Broadwell

Message ID 1461155942-7749-1-git-send-email-mika.kahola@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mika Kahola April 20, 2016, 12:39 p.m. UTC
It was noticed on bug #94087 that module parameter
i915.edp_vswing=2 that should override the VBT setting
to use default voltage swing (400 mV) was not applied
for Broadwell.

This patch provides a fix for this by checking if default
i.e. higher voltage swing is requested to be used and
applies the DDI translations table for DP instead of eDP
(low vswing) table.

v2: Combine two if statements into one (Jani)
v3: Change dev_priv->edp_low_vswing to use dev_priv->vbt.edp.low_vswing

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94087
Signed-off-by: Mika Kahola <mika.kahola@intel.com>
---
 drivers/gpu/drm/i915/intel_ddi.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

Comments

Ville Syrjälä April 20, 2016, 6:39 p.m. UTC | #1
On Wed, Apr 20, 2016 at 05:54:36PM -0000, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915: Fix eDP low vswing for Broadwell (rev4)
> URL   : https://patchwork.freedesktop.org/series/4499/
> State : warning
> 
> == Summary ==
> 
> Series 4499v4 drm/i915: Fix eDP low vswing for Broadwell
> http://patchwork.freedesktop.org/api/1.0/series/4499/revisions/4/mbox/
> 
> Test gem_busy:
>         Subgroup basic-blt:
>                 pass       -> SKIP       (bsw-nuc-2)

This fella sure likes to bounce around on bsw. Unrelated.

> 
> bdw-nuci7        total:192  pass:180  dwarn:0   dfail:0   fail:0   skip:12 
> bdw-ultra        total:192  pass:169  dwarn:0   dfail:0   fail:0   skip:23 
> bsw-nuc-2        total:191  pass:151  dwarn:0   dfail:0   fail:0   skip:40 
> byt-nuc          total:191  pass:153  dwarn:0   dfail:0   fail:0   skip:38 
> hsw-brixbox      total:192  pass:168  dwarn:0   dfail:0   fail:0   skip:24 
> hsw-gt2          total:192  pass:173  dwarn:0   dfail:0   fail:0   skip:19 
> ilk-hp8440p      total:192  pass:135  dwarn:0   dfail:0   fail:0   skip:57 
> ivb-t430s        total:192  pass:164  dwarn:0   dfail:0   fail:0   skip:28 
> skl-i7k-2        total:192  pass:167  dwarn:0   dfail:0   fail:0   skip:25 
> skl-nuci5        total:192  pass:181  dwarn:0   dfail:0   fail:0   skip:11 
> snb-dellxps      total:192  pass:154  dwarn:0   dfail:0   fail:0   skip:38 
> snb-x220t        total:192  pass:154  dwarn:0   dfail:0   fail:1   skip:37 
> 
> Results at /archive/results/CI_IGT_test/Patchwork_1958/
> 
> 4dc4ce0da8c23182942ce0ecb96cdac57bb1bcd7 drm-intel-nightly: 2016y-04m-20d-16h-33m-39s UTC integration manifest
> 3be11eb drm/i915: Fix eDP low vswing for Broadwell
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Ville Syrjälä April 20, 2016, 6:51 p.m. UTC | #2
On Wed, Apr 20, 2016 at 03:39:02PM +0300, Mika Kahola wrote:
> It was noticed on bug #94087 that module parameter
> i915.edp_vswing=2 that should override the VBT setting
> to use default voltage swing (400 mV) was not applied
> for Broadwell.
> 
> This patch provides a fix for this by checking if default
> i.e. higher voltage swing is requested to be used and
> applies the DDI translations table for DP instead of eDP
> (low vswing) table.
> 
> v2: Combine two if statements into one (Jani)
> v3: Change dev_priv->edp_low_vswing to use dev_priv->vbt.edp.low_vswing
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94087
> Signed-off-by: Mika Kahola <mika.kahola@intel.com>

Patch pushed to dinq, with cc:stable.

> ---
>  drivers/gpu/drm/i915/intel_ddi.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index c2348fb..a887b31 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -443,9 +443,17 @@ void intel_prepare_ddi_buffer(struct intel_encoder *encoder)
>  	} else if (IS_BROADWELL(dev_priv)) {
>  		ddi_translations_fdi = bdw_ddi_translations_fdi;
>  		ddi_translations_dp = bdw_ddi_translations_dp;
> -		ddi_translations_edp = bdw_ddi_translations_edp;
> +
> +		if (dev_priv->vbt.edp.low_vswing) {
> +			ddi_translations_edp = bdw_ddi_translations_edp;
> +			n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_edp);
> +		} else {
> +			ddi_translations_edp = bdw_ddi_translations_dp;
> +			n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_dp);
> +		}
> +
>  		ddi_translations_hdmi = bdw_ddi_translations_hdmi;
> -		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;
> -- 
> 1.9.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index c2348fb..a887b31 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -443,9 +443,17 @@  void intel_prepare_ddi_buffer(struct intel_encoder *encoder)
 	} else if (IS_BROADWELL(dev_priv)) {
 		ddi_translations_fdi = bdw_ddi_translations_fdi;
 		ddi_translations_dp = bdw_ddi_translations_dp;
-		ddi_translations_edp = bdw_ddi_translations_edp;
+
+		if (dev_priv->vbt.edp.low_vswing) {
+			ddi_translations_edp = bdw_ddi_translations_edp;
+			n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_edp);
+		} else {
+			ddi_translations_edp = bdw_ddi_translations_dp;
+			n_edp_entries = ARRAY_SIZE(bdw_ddi_translations_dp);
+		}
+
 		ddi_translations_hdmi = bdw_ddi_translations_hdmi;
-		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;