[Intel-gfx] [PATCH] drm/i915/cfl: Basic DDI plumbing for Coffee Lake.

Pandiyan, Dhinakaran dhinakaran.pandiyan at intel.com
Fri Jun 9 21:16:00 UTC 2017


On Fri, 2017-06-09 at 13:03 -0700, Rodrigo Vivi wrote:
> All here is pretty much like Kabylake.
> 
> Including CFL-U has to use same ddi translation table
> as KBL-U for now.
> 
> v2: Include missed IS_COFFEELAKE on edp trans table. (DK)
>     Handle CFL-U with same translation table as KBL-U. (DK and
>     confirmed with HW engineers)
> 
> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.h  |  2 ++
>  drivers/gpu/drm/i915/intel_ddi.c | 11 ++++++-----
>  2 files changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 602fb33..57af564 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -2811,6 +2811,8 @@ static inline struct scatterlist *__sg_next(struct scatterlist *sg)
>  				 (INTEL_DEVID(dev_priv) & 0x00F0) == 0x0020)
>  #define IS_SKL_GT4(dev_priv)	(IS_SKYLAKE(dev_priv) && \
>  				 (INTEL_DEVID(dev_priv) & 0x00F0) == 0x0030)
> +#define IS_CFL_ULT(dev_priv)	(IS_COFFEELAKE(dev_priv) && \
> +				 (INTEL_DEVID(dev_priv) & 0x00F0) == 0x00A0)
>  
>  #define IS_ALPHA_SUPPORT(intel_info) ((intel_info)->is_alpha_support)
>  
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index 8bac628..6d4ad7c 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -404,7 +404,7 @@ enum port intel_ddi_get_encoder_port(struct intel_encoder *encoder)
>  	if (IS_KBL_ULX(dev_priv)) {
>  		*n_entries = ARRAY_SIZE(kbl_y_ddi_translations_dp);
>  		return kbl_y_ddi_translations_dp;
> -	} else if (IS_KBL_ULT(dev_priv)) {
> +	} else if (IS_KBL_ULT(dev_priv) || IS_CFL_ULT(dev_priv)) {
>  		*n_entries = ARRAY_SIZE(kbl_u_ddi_translations_dp);
>  		return kbl_u_ddi_translations_dp;
>  	} else {
> @@ -429,7 +429,7 @@ enum port intel_ddi_get_encoder_port(struct intel_encoder *encoder)
>  		}
>  	}
>  

How about the dev_priv->vbt.edp.low_vswing case?


> -	if (IS_KABYLAKE(dev_priv))
> +	if (IS_KABYLAKE(dev_priv) || IS_COFFEELAKE(dev_priv))
>  		return kbl_get_buf_trans_dp(dev_priv, n_entries);
>  	else
>  		return skl_get_buf_trans_dp(dev_priv, n_entries);
> @@ -485,7 +485,7 @@ static int intel_ddi_hdmi_level(struct drm_i915_private *dev_priv, enum port por
>  intel_ddi_get_buf_trans_dp(struct drm_i915_private *dev_priv,
>  			   int *n_entries)
>  {
> -	if (IS_KABYLAKE(dev_priv)) {
> +	if (IS_KABYLAKE(dev_priv) || IS_COFFEELAKE(dev_priv)) {
>  		return kbl_get_buf_trans_dp(dev_priv, n_entries);
>  	} else if (IS_SKYLAKE(dev_priv)) {
>  		return skl_get_buf_trans_dp(dev_priv, n_entries);
> @@ -505,7 +505,8 @@ static int intel_ddi_hdmi_level(struct drm_i915_private *dev_priv, enum port por
>  intel_ddi_get_buf_trans_edp(struct drm_i915_private *dev_priv,
>  			    int *n_entries)
>  {
> -	if (IS_KABYLAKE(dev_priv) || IS_SKYLAKE(dev_priv)) {
> +	if (IS_KABYLAKE(dev_priv) || IS_SKYLAKE(dev_priv) ||
> +	    IS_COFFEELAKE(dev_priv)) {
>  		return skl_get_buf_trans_edp(dev_priv, n_entries);
>  	} else if (IS_BROADWELL(dev_priv)) {
>  		return bdw_get_buf_trans_edp(dev_priv, n_entries);
> @@ -1478,7 +1479,7 @@ static void skl_ddi_set_iboost(struct intel_encoder *encoder, u32 level)
>  		if (dp_iboost) {
>  			iboost = dp_iboost;
>  		} else {
> -			if (IS_KABYLAKE(dev_priv))
> +			if (IS_KABYLAKE(dev_priv) || IS_COFFEELAKE(dev_priv))
>  				ddi_translations = kbl_get_buf_trans_dp(dev_priv,
>  									&n_entries);
>  			else



More information about the Intel-gfx mailing list