[Intel-gfx] [PATCH 1/7] drm/i915: Fix cpt/ppt max pre-emphasis

Souza, Jose jose.souza at intel.com
Sat May 30 01:30:28 UTC 2020


On Tue, 2020-05-12 at 20:41 +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> cpt/ppt support pre-emphasis level 3. Let's actually declare
> support for it, instead of clamping things to level 2.
> 
> Also tweak the if-ladder in intel_dp_voltage_max() to match
> intel_dp_pre_emphasis_max() to make it easier to compare them.

Reviewed-by: José Roberto de Souza <jose.souza at intel.com>

> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 67723dede1d1..7541264ff4e9 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -3957,12 +3957,11 @@ intel_dp_voltage_max(struct intel_dp *intel_dp)
>  
>  	if (HAS_DDI(dev_priv))
>  		return intel_ddi_dp_voltage_max(encoder);
> -	else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
> +	else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv) ||
> +		 (HAS_PCH_CPT(dev_priv) && port != PORT_A))
>  		return DP_TRAIN_VOLTAGE_SWING_LEVEL_3;
>  	else if (IS_IVYBRIDGE(dev_priv) && port == PORT_A)
>  		return DP_TRAIN_VOLTAGE_SWING_LEVEL_2;
> -	else if (HAS_PCH_CPT(dev_priv) && port != PORT_A)
> -		return DP_TRAIN_VOLTAGE_SWING_LEVEL_3;
>  	else
>  		return DP_TRAIN_VOLTAGE_SWING_LEVEL_2;
>  }
> @@ -3976,7 +3975,8 @@ intel_dp_pre_emphasis_max(struct intel_dp *intel_dp, u8 voltage_swing)
>  
>  	if (HAS_DDI(dev_priv)) {
>  		return intel_ddi_dp_pre_emphasis_max(encoder, voltage_swing);
> -	} else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
> +	} else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv) ||
> +		   (HAS_PCH_CPT(dev_priv) && port != PORT_A)) {

Matches intel_dp_voltage_max().

>  		switch (voltage_swing & DP_TRAIN_VOLTAGE_SWING_MASK) {
>  		case DP_TRAIN_VOLTAGE_SWING_LEVEL_0:
>  			return DP_TRAIN_PRE_EMPH_LEVEL_3;


More information about the Intel-gfx mailing list