Re: [PATCH v2 02/10] drm/i915: Introduce has_buf_trans_select()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 01, 2021 at 04:00:59PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> 
> Add a small helper to determine if DDI_BUF_CTL uses the
> DDI_BUF_TRANS_SELECT field, and whether we have the
> accompanying DDI_BUF_TRANS table in the hardware.
> 
> Cc: Imre Deak <imre.deak@xxxxxxxxx>
> Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

Reviewed-by: Imre Deak <imre.deak@xxxxxxxxx>

> ---
>  drivers/gpu/drm/i915/display/intel_ddi.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index f6429114ce7c..dbcf4ddd0f3b 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -92,6 +92,11 @@ static int intel_ddi_hdmi_level(struct intel_encoder *encoder,
>  	return level;
>  }
>  
> +static bool has_buf_trans_select(struct drm_i915_private *i915)
> +{
> +	return DISPLAY_VER(i915) < 10 && !IS_BROXTON(i915);
> +}
> +
>  static bool has_iboost(struct drm_i915_private *i915)
>  {
>  	return DISPLAY_VER(i915) == 9 && !IS_BROXTON(i915);
> @@ -2640,7 +2645,8 @@ static void hsw_ddi_pre_enable_dp(struct intel_atomic_state *state,
>  		icl_ddi_vswing_sequence(encoder, crtc_state, level);
>  	else if (IS_GEMINILAKE(dev_priv) || IS_BROXTON(dev_priv))
>  		bxt_ddi_vswing_sequence(encoder, crtc_state, level);
> -	else
> +
> +	if (has_buf_trans_select(dev_priv))
>  		hsw_prepare_dp_ddi_buffers(encoder, crtc_state);
>  
>  	intel_ddi_power_up_lanes(encoder, crtc_state);
> @@ -3086,7 +3092,8 @@ static void intel_enable_ddi_hdmi(struct intel_atomic_state *state,
>  		icl_ddi_vswing_sequence(encoder, crtc_state, level);
>  	else if (IS_GEMINILAKE(dev_priv) || IS_BROXTON(dev_priv))
>  		bxt_ddi_vswing_sequence(encoder, crtc_state, level);
> -	else
> +
> +	if (has_buf_trans_select(dev_priv))
>  		hsw_prepare_hdmi_ddi_buffers(encoder, crtc_state, level);
>  
>  	if (has_iboost(dev_priv))
> -- 
> 2.32.0
> 



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux