Re: [Intel-gfx] [PATCH 2/2] drm/i915: KBL - Recommended buffer translation programming for DisplayPort
On Thu, 06 Oct 2016, "Vivi, Rodrigo"wrote: > On Tue, 2016-10-04 at 10:05 +0300, Jani Nikula wrote: >> On Tue, 04 Oct 2016, "Vivi, Rodrigo" wrote: >> > On Mon, 2016-10-03 at 13:50 +0300, Jani Nikula wrote: >> >> On Fri, 30 Sep 2016, Rodrigo Vivi wrote: >> >> > According to spec: "KBL re-uses SKL values, except where >> >> > specific KBL values are listed." >> >> > >> >> > And recently spec has changed adding different table for Display Port >> >> > only. >> >> > But for all SKUs (H,S,U,Y) we have slightly different values. >> >> > >> >> > Cc: Manasi Navare >> >> > Cc: Arthur Runyan >> >> > Signed-off-by: Rodrigo Vivi >> >> > --- >> >> > drivers/gpu/drm/i915/intel_ddi.c | 88 >> >> > +++- >> >> > 1 file changed, 78 insertions(+), 10 deletions(-) >> >> > >> >> > diff --git a/drivers/gpu/drm/i915/intel_ddi.c >> >> > b/drivers/gpu/drm/i915/intel_ddi.c >> >> > index 018964b..1573360 100644 >> >> > --- a/drivers/gpu/drm/i915/intel_ddi.c >> >> > +++ b/drivers/gpu/drm/i915/intel_ddi.c >> >> > @@ -167,8 +167,47 @@ static const struct ddi_buf_trans >> >> > skl_y_ddi_translations_dp[] = { >> >> > { 0x80005012, 0x00C0, 0x3 }, >> >> > }; >> >> > >> >> > +/* Kabylake H and S */ >> >> > +static const struct ddi_buf_trans kbl_ddi_translations_dp[] = { >> >> > + { 0x2016, 0x00A0, 0x0 }, >> >> > + { 0x5012, 0x009B, 0x0 }, >> >> > + { 0x7011, 0x0088, 0x0 }, >> >> > + { 0x80009010, 0x00C0, 0x1 }, >> >> > + { 0x2016, 0x009B, 0x0 }, >> >> > + { 0x5012, 0x0088, 0x0 }, >> >> > + { 0x80007011, 0x00C0, 0x1 }, >> >> > + { 0x2016, 0x009F, 0x0 }, >> >> > + { 0x80005012, 0x00C0, 0x1 }, >> >> > +}; >> >> > + >> >> > +/* Kabylake U */ >> >> > +static const struct ddi_buf_trans kbl_u_ddi_translations_dp[] = { >> >> > + { 0x201B, 0x00A1, 0x0 }, >> >> > + { 0x5012, 0x0088, 0x0 }, >> >> > + { 0x80007011, 0x00CD, 0x3 }, >> >> > + { 0x80009010, 0x00C0, 0x3 }, >> >> > + { 0x201B, 0x009D, 0x0 }, >> >> > + { 0x80005012, 0x00C0, 0x3 }, >> >> > + { 0x80007011, 0x00C0, 0x3 }, >> >> > + { 0x2016, 0x004F, 0x0 }, >> >> > + { 0x80005012, 0x00C0, 0x3 }, >> >> > +}; >> >> > + >> >> > +/* Kabylake Y */ >> >> > +static const struct ddi_buf_trans kbl_y_ddi_translations_dp[] = { >> >> > + { 0x1017, 0x00A1, 0x0 }, >> >> > + { 0x5012, 0x0088, 0x0 }, >> >> > + { 0x80007011, 0x00CD, 0x3 }, >> >> > + { 0x8000800F, 0x00C0, 0x3 }, >> >> > + { 0x1017, 0x009D, 0x0 }, >> >> > + { 0x80005012, 0x00C0, 0x3 }, >> >> > + { 0x80007011, 0x00C0, 0x3 }, >> >> > + { 0x1017, 0x004C, 0x0 }, >> >> > + { 0x80005012, 0x00C0, 0x3 }, >> >> > +}; >> >> > + >> >> > /* >> >> > - * Skylake H and S >> >> > + * Skylake/Kabylake H and S >> >> > * eDP 1.4 low vswing translation parameters >> >> > */ >> >> > static const struct ddi_buf_trans skl_ddi_translations_edp[] = { >> >> > @@ -185,7 +224,7 @@ static const struct ddi_buf_trans >> >> > skl_ddi_translations_edp[] = { >> >> > }; >> >> > >> >> > /* >> >> > - * Skylake U >> >> > + * Skylake/Kabylake U >> >> > * eDP 1.4 low vswing translation parameters >> >> > */ >> >> > static const struct ddi_buf_trans skl_u_ddi_translations_edp[] = { >> >> > @@ -202,7 +241,7 @@ static const struct ddi_buf_trans >> >> > skl_u_ddi_translations_edp[] = { >> >> > }; >> >> > >> >> > /* >> >> > - * Skylake Y >> >> > + * Skylake/Kabylake Y >> >> > * eDP 1.4 low vswing translation parameters >> >> > */ >> >> > static const struct ddi_buf_trans skl_y_ddi_translations_edp[] = { >> >> > @@ -218,7 +257,7 @@ static const struct ddi_buf_trans >> >> > skl_y_ddi_translations_edp[] = { >> >> > { 0x0018, 0x008A, 0x0 }, >> >> > }; >> >> > >> >> > -/* Skylake U, H and S */ >> >> > +/* Skylake/Kabylake U, H and S */ >> >> > static const struct ddi_buf_trans skl_ddi_translations_hdmi[] = { >> >> > { 0x0018, 0x00AC, 0x0 }, >> >> > { 0x5012, 0x009D, 0x0 }, >> >> > @@ -233,7 +272,7 @@ static const struct ddi_buf_trans >> >> > skl_ddi_translations_hdmi[] = { >> >> > { 0x8018, 0x00C0, 0x1 }, >> >> > }; >> >> > >> >> > -/* Skylake Y */ >> >> > +/* Skylake/Kabylake Y */ >> >> > static const struct ddi_buf_trans skl_y_ddi_translations_hdmi[] = { >> >> > { 0x0018, 0x00A1, 0x0 }, >> >> > { 0x5012, 0x00DF, 0x0 }, >> >> > @@ -334,10 +373,10 @@ bdw_get_buf_trans_edp(struct drm_i915_private >> >> > *dev_priv, int *n_entries) >> >> > static const struct ddi_buf_trans * >> >> > skl_get_buf_trans_dp(struct drm_i915_private *dev_priv,
Re: [Intel-gfx] [PATCH 2/2] drm/i915: KBL - Recommended buffer translation programming for DisplayPort
On Tue, 2016-10-04 at 10:05 +0300, Jani Nikula wrote: > On Tue, 04 Oct 2016, "Vivi, Rodrigo"wrote: > > On Mon, 2016-10-03 at 13:50 +0300, Jani Nikula wrote: > >> On Fri, 30 Sep 2016, Rodrigo Vivi wrote: > >> > According to spec: "KBL re-uses SKL values, except where > >> > specific KBL values are listed." > >> > > >> > And recently spec has changed adding different table for Display Port > >> > only. > >> > But for all SKUs (H,S,U,Y) we have slightly different values. > >> > > >> > Cc: Manasi Navare > >> > Cc: Arthur Runyan > >> > Signed-off-by: Rodrigo Vivi > >> > --- > >> > drivers/gpu/drm/i915/intel_ddi.c | 88 > >> > +++- > >> > 1 file changed, 78 insertions(+), 10 deletions(-) > >> > > >> > diff --git a/drivers/gpu/drm/i915/intel_ddi.c > >> > b/drivers/gpu/drm/i915/intel_ddi.c > >> > index 018964b..1573360 100644 > >> > --- a/drivers/gpu/drm/i915/intel_ddi.c > >> > +++ b/drivers/gpu/drm/i915/intel_ddi.c > >> > @@ -167,8 +167,47 @@ static const struct ddi_buf_trans > >> > skl_y_ddi_translations_dp[] = { > >> > { 0x80005012, 0x00C0, 0x3 }, > >> > }; > >> > > >> > +/* Kabylake H and S */ > >> > +static const struct ddi_buf_trans kbl_ddi_translations_dp[] = { > >> > +{ 0x2016, 0x00A0, 0x0 }, > >> > +{ 0x5012, 0x009B, 0x0 }, > >> > +{ 0x7011, 0x0088, 0x0 }, > >> > +{ 0x80009010, 0x00C0, 0x1 }, > >> > +{ 0x2016, 0x009B, 0x0 }, > >> > +{ 0x5012, 0x0088, 0x0 }, > >> > +{ 0x80007011, 0x00C0, 0x1 }, > >> > +{ 0x2016, 0x009F, 0x0 }, > >> > +{ 0x80005012, 0x00C0, 0x1 }, > >> > +}; > >> > + > >> > +/* Kabylake U */ > >> > +static const struct ddi_buf_trans kbl_u_ddi_translations_dp[] = { > >> > +{ 0x201B, 0x00A1, 0x0 }, > >> > +{ 0x5012, 0x0088, 0x0 }, > >> > +{ 0x80007011, 0x00CD, 0x3 }, > >> > +{ 0x80009010, 0x00C0, 0x3 }, > >> > +{ 0x201B, 0x009D, 0x0 }, > >> > +{ 0x80005012, 0x00C0, 0x3 }, > >> > +{ 0x80007011, 0x00C0, 0x3 }, > >> > +{ 0x2016, 0x004F, 0x0 }, > >> > +{ 0x80005012, 0x00C0, 0x3 }, > >> > +}; > >> > + > >> > +/* Kabylake Y */ > >> > +static const struct ddi_buf_trans kbl_y_ddi_translations_dp[] = { > >> > +{ 0x1017, 0x00A1, 0x0 }, > >> > +{ 0x5012, 0x0088, 0x0 }, > >> > +{ 0x80007011, 0x00CD, 0x3 }, > >> > +{ 0x8000800F, 0x00C0, 0x3 }, > >> > +{ 0x1017, 0x009D, 0x0 }, > >> > +{ 0x80005012, 0x00C0, 0x3 }, > >> > +{ 0x80007011, 0x00C0, 0x3 }, > >> > +{ 0x1017, 0x004C, 0x0 }, > >> > +{ 0x80005012, 0x00C0, 0x3 }, > >> > +}; > >> > + > >> > /* > >> > - * Skylake H and S > >> > + * Skylake/Kabylake H and S > >> > * eDP 1.4 low vswing translation parameters > >> > */ > >> > static const struct ddi_buf_trans skl_ddi_translations_edp[] = { > >> > @@ -185,7 +224,7 @@ static const struct ddi_buf_trans > >> > skl_ddi_translations_edp[] = { > >> > }; > >> > > >> > /* > >> > - * Skylake U > >> > + * Skylake/Kabylake U > >> > * eDP 1.4 low vswing translation parameters > >> > */ > >> > static const struct ddi_buf_trans skl_u_ddi_translations_edp[] = { > >> > @@ -202,7 +241,7 @@ static const struct ddi_buf_trans > >> > skl_u_ddi_translations_edp[] = { > >> > }; > >> > > >> > /* > >> > - * Skylake Y > >> > + * Skylake/Kabylake Y > >> > * eDP 1.4 low vswing translation parameters > >> > */ > >> > static const struct ddi_buf_trans skl_y_ddi_translations_edp[] = { > >> > @@ -218,7 +257,7 @@ static const struct ddi_buf_trans > >> > skl_y_ddi_translations_edp[] = { > >> > { 0x0018, 0x008A, 0x0 }, > >> > }; > >> > > >> > -/* Skylake U, H and S */ > >> > +/* Skylake/Kabylake U, H and S */ > >> > static const struct ddi_buf_trans skl_ddi_translations_hdmi[] = { > >> > { 0x0018, 0x00AC, 0x0 }, > >> > { 0x5012, 0x009D, 0x0 }, > >> > @@ -233,7 +272,7 @@ static const struct ddi_buf_trans > >> > skl_ddi_translations_hdmi[] = { > >> > { 0x8018, 0x00C0, 0x1 }, > >> > }; > >> > > >> > -/* Skylake Y */ > >> > +/* Skylake/Kabylake Y */ > >> > static const struct ddi_buf_trans skl_y_ddi_translations_hdmi[] = { > >> > { 0x0018, 0x00A1, 0x0 }, > >> > { 0x5012, 0x00DF, 0x0 }, > >> > @@ -334,10 +373,10 @@ bdw_get_buf_trans_edp(struct drm_i915_private > >> > *dev_priv, int *n_entries) > >> > static const struct ddi_buf_trans * > >> > skl_get_buf_trans_dp(struct drm_i915_private *dev_priv, int *n_entries) > >> > { > >> > -if (IS_SKL_ULX(dev_priv) || IS_KBL_ULX(dev_priv)) { > >> > +if (IS_SKL_ULX(dev_priv)) { > >> >
Re: [Intel-gfx] [PATCH 2/2] drm/i915: KBL - Recommended buffer translation programming for DisplayPort
On Tue, 04 Oct 2016, "Vivi, Rodrigo"wrote: > On Mon, 2016-10-03 at 13:50 +0300, Jani Nikula wrote: >> On Fri, 30 Sep 2016, Rodrigo Vivi wrote: >> > According to spec: "KBL re-uses SKL values, except where >> > specific KBL values are listed." >> > >> > And recently spec has changed adding different table for Display Port only. >> > But for all SKUs (H,S,U,Y) we have slightly different values. >> > >> > Cc: Manasi Navare >> > Cc: Arthur Runyan >> > Signed-off-by: Rodrigo Vivi >> > --- >> > drivers/gpu/drm/i915/intel_ddi.c | 88 >> > +++- >> > 1 file changed, 78 insertions(+), 10 deletions(-) >> > >> > diff --git a/drivers/gpu/drm/i915/intel_ddi.c >> > b/drivers/gpu/drm/i915/intel_ddi.c >> > index 018964b..1573360 100644 >> > --- a/drivers/gpu/drm/i915/intel_ddi.c >> > +++ b/drivers/gpu/drm/i915/intel_ddi.c >> > @@ -167,8 +167,47 @@ static const struct ddi_buf_trans >> > skl_y_ddi_translations_dp[] = { >> >{ 0x80005012, 0x00C0, 0x3 }, >> > }; >> > >> > +/* Kabylake H and S */ >> > +static const struct ddi_buf_trans kbl_ddi_translations_dp[] = { >> > + { 0x2016, 0x00A0, 0x0 }, >> > + { 0x5012, 0x009B, 0x0 }, >> > + { 0x7011, 0x0088, 0x0 }, >> > + { 0x80009010, 0x00C0, 0x1 }, >> > + { 0x2016, 0x009B, 0x0 }, >> > + { 0x5012, 0x0088, 0x0 }, >> > + { 0x80007011, 0x00C0, 0x1 }, >> > + { 0x2016, 0x009F, 0x0 }, >> > + { 0x80005012, 0x00C0, 0x1 }, >> > +}; >> > + >> > +/* Kabylake U */ >> > +static const struct ddi_buf_trans kbl_u_ddi_translations_dp[] = { >> > + { 0x201B, 0x00A1, 0x0 }, >> > + { 0x5012, 0x0088, 0x0 }, >> > + { 0x80007011, 0x00CD, 0x3 }, >> > + { 0x80009010, 0x00C0, 0x3 }, >> > + { 0x201B, 0x009D, 0x0 }, >> > + { 0x80005012, 0x00C0, 0x3 }, >> > + { 0x80007011, 0x00C0, 0x3 }, >> > + { 0x2016, 0x004F, 0x0 }, >> > + { 0x80005012, 0x00C0, 0x3 }, >> > +}; >> > + >> > +/* Kabylake Y */ >> > +static const struct ddi_buf_trans kbl_y_ddi_translations_dp[] = { >> > + { 0x1017, 0x00A1, 0x0 }, >> > + { 0x5012, 0x0088, 0x0 }, >> > + { 0x80007011, 0x00CD, 0x3 }, >> > + { 0x8000800F, 0x00C0, 0x3 }, >> > + { 0x1017, 0x009D, 0x0 }, >> > + { 0x80005012, 0x00C0, 0x3 }, >> > + { 0x80007011, 0x00C0, 0x3 }, >> > + { 0x1017, 0x004C, 0x0 }, >> > + { 0x80005012, 0x00C0, 0x3 }, >> > +}; >> > + >> > /* >> > - * Skylake H and S >> > + * Skylake/Kabylake H and S >> > * eDP 1.4 low vswing translation parameters >> > */ >> > static const struct ddi_buf_trans skl_ddi_translations_edp[] = { >> > @@ -185,7 +224,7 @@ static const struct ddi_buf_trans >> > skl_ddi_translations_edp[] = { >> > }; >> > >> > /* >> > - * Skylake U >> > + * Skylake/Kabylake U >> > * eDP 1.4 low vswing translation parameters >> > */ >> > static const struct ddi_buf_trans skl_u_ddi_translations_edp[] = { >> > @@ -202,7 +241,7 @@ static const struct ddi_buf_trans >> > skl_u_ddi_translations_edp[] = { >> > }; >> > >> > /* >> > - * Skylake Y >> > + * Skylake/Kabylake Y >> > * eDP 1.4 low vswing translation parameters >> > */ >> > static const struct ddi_buf_trans skl_y_ddi_translations_edp[] = { >> > @@ -218,7 +257,7 @@ static const struct ddi_buf_trans >> > skl_y_ddi_translations_edp[] = { >> >{ 0x0018, 0x008A, 0x0 }, >> > }; >> > >> > -/* Skylake U, H and S */ >> > +/* Skylake/Kabylake U, H and S */ >> > static const struct ddi_buf_trans skl_ddi_translations_hdmi[] = { >> >{ 0x0018, 0x00AC, 0x0 }, >> >{ 0x5012, 0x009D, 0x0 }, >> > @@ -233,7 +272,7 @@ static const struct ddi_buf_trans >> > skl_ddi_translations_hdmi[] = { >> >{ 0x8018, 0x00C0, 0x1 }, >> > }; >> > >> > -/* Skylake Y */ >> > +/* Skylake/Kabylake Y */ >> > static const struct ddi_buf_trans skl_y_ddi_translations_hdmi[] = { >> >{ 0x0018, 0x00A1, 0x0 }, >> >{ 0x5012, 0x00DF, 0x0 }, >> > @@ -334,10 +373,10 @@ bdw_get_buf_trans_edp(struct drm_i915_private >> > *dev_priv, int *n_entries) >> > static const struct ddi_buf_trans * >> > skl_get_buf_trans_dp(struct drm_i915_private *dev_priv, int *n_entries) >> > { >> > - if (IS_SKL_ULX(dev_priv) || IS_KBL_ULX(dev_priv)) { >> > + if (IS_SKL_ULX(dev_priv)) { >> >*n_entries = ARRAY_SIZE(skl_y_ddi_translations_dp); >> >return skl_y_ddi_translations_dp; >> > - } else if (IS_SKL_ULT(dev_priv) || IS_KBL_ULT(dev_priv)) { >> > + } else if (IS_SKL_ULT(dev_priv)) { >> >*n_entries = ARRAY_SIZE(skl_u_ddi_translations_dp); >> >return skl_u_ddi_translations_dp; >> >} else { >> > @@ -347,6 +386,21 @@ skl_get_buf_trans_dp(struct drm_i915_private >> > *dev_priv, int *n_entries) >> > } >> > >> > static const struct ddi_buf_trans * >> >
Re: [Intel-gfx] [PATCH 2/2] drm/i915: KBL - Recommended buffer translation programming for DisplayPort
On Mon, 2016-10-03 at 13:50 +0300, Jani Nikula wrote: > On Fri, 30 Sep 2016, Rodrigo Viviwrote: > > According to spec: "KBL re-uses SKL values, except where > > specific KBL values are listed." > > > > And recently spec has changed adding different table for Display Port only. > > But for all SKUs (H,S,U,Y) we have slightly different values. > > > > Cc: Manasi Navare > > Cc: Arthur Runyan > > Signed-off-by: Rodrigo Vivi > > --- > > drivers/gpu/drm/i915/intel_ddi.c | 88 > > +++- > > 1 file changed, 78 insertions(+), 10 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/intel_ddi.c > > b/drivers/gpu/drm/i915/intel_ddi.c > > index 018964b..1573360 100644 > > --- a/drivers/gpu/drm/i915/intel_ddi.c > > +++ b/drivers/gpu/drm/i915/intel_ddi.c > > @@ -167,8 +167,47 @@ static const struct ddi_buf_trans > > skl_y_ddi_translations_dp[] = { > > { 0x80005012, 0x00C0, 0x3 }, > > }; > > > > +/* Kabylake H and S */ > > +static const struct ddi_buf_trans kbl_ddi_translations_dp[] = { > > + { 0x2016, 0x00A0, 0x0 }, > > + { 0x5012, 0x009B, 0x0 }, > > + { 0x7011, 0x0088, 0x0 }, > > + { 0x80009010, 0x00C0, 0x1 }, > > + { 0x2016, 0x009B, 0x0 }, > > + { 0x5012, 0x0088, 0x0 }, > > + { 0x80007011, 0x00C0, 0x1 }, > > + { 0x2016, 0x009F, 0x0 }, > > + { 0x80005012, 0x00C0, 0x1 }, > > +}; > > + > > +/* Kabylake U */ > > +static const struct ddi_buf_trans kbl_u_ddi_translations_dp[] = { > > + { 0x201B, 0x00A1, 0x0 }, > > + { 0x5012, 0x0088, 0x0 }, > > + { 0x80007011, 0x00CD, 0x3 }, > > + { 0x80009010, 0x00C0, 0x3 }, > > + { 0x201B, 0x009D, 0x0 }, > > + { 0x80005012, 0x00C0, 0x3 }, > > + { 0x80007011, 0x00C0, 0x3 }, > > + { 0x2016, 0x004F, 0x0 }, > > + { 0x80005012, 0x00C0, 0x3 }, > > +}; > > + > > +/* Kabylake Y */ > > +static const struct ddi_buf_trans kbl_y_ddi_translations_dp[] = { > > + { 0x1017, 0x00A1, 0x0 }, > > + { 0x5012, 0x0088, 0x0 }, > > + { 0x80007011, 0x00CD, 0x3 }, > > + { 0x8000800F, 0x00C0, 0x3 }, > > + { 0x1017, 0x009D, 0x0 }, > > + { 0x80005012, 0x00C0, 0x3 }, > > + { 0x80007011, 0x00C0, 0x3 }, > > + { 0x1017, 0x004C, 0x0 }, > > + { 0x80005012, 0x00C0, 0x3 }, > > +}; > > + > > /* > > - * Skylake H and S > > + * Skylake/Kabylake H and S > > * eDP 1.4 low vswing translation parameters > > */ > > static const struct ddi_buf_trans skl_ddi_translations_edp[] = { > > @@ -185,7 +224,7 @@ static const struct ddi_buf_trans > > skl_ddi_translations_edp[] = { > > }; > > > > /* > > - * Skylake U > > + * Skylake/Kabylake U > > * eDP 1.4 low vswing translation parameters > > */ > > static const struct ddi_buf_trans skl_u_ddi_translations_edp[] = { > > @@ -202,7 +241,7 @@ static const struct ddi_buf_trans > > skl_u_ddi_translations_edp[] = { > > }; > > > > /* > > - * Skylake Y > > + * Skylake/Kabylake Y > > * eDP 1.4 low vswing translation parameters > > */ > > static const struct ddi_buf_trans skl_y_ddi_translations_edp[] = { > > @@ -218,7 +257,7 @@ static const struct ddi_buf_trans > > skl_y_ddi_translations_edp[] = { > > { 0x0018, 0x008A, 0x0 }, > > }; > > > > -/* Skylake U, H and S */ > > +/* Skylake/Kabylake U, H and S */ > > static const struct ddi_buf_trans skl_ddi_translations_hdmi[] = { > > { 0x0018, 0x00AC, 0x0 }, > > { 0x5012, 0x009D, 0x0 }, > > @@ -233,7 +272,7 @@ static const struct ddi_buf_trans > > skl_ddi_translations_hdmi[] = { > > { 0x8018, 0x00C0, 0x1 }, > > }; > > > > -/* Skylake Y */ > > +/* Skylake/Kabylake Y */ > > static const struct ddi_buf_trans skl_y_ddi_translations_hdmi[] = { > > { 0x0018, 0x00A1, 0x0 }, > > { 0x5012, 0x00DF, 0x0 }, > > @@ -334,10 +373,10 @@ bdw_get_buf_trans_edp(struct drm_i915_private > > *dev_priv, int *n_entries) > > static const struct ddi_buf_trans * > > skl_get_buf_trans_dp(struct drm_i915_private *dev_priv, int *n_entries) > > { > > - if (IS_SKL_ULX(dev_priv) || IS_KBL_ULX(dev_priv)) { > > + if (IS_SKL_ULX(dev_priv)) { > > *n_entries = ARRAY_SIZE(skl_y_ddi_translations_dp); > > return skl_y_ddi_translations_dp; > > - } else if (IS_SKL_ULT(dev_priv) || IS_KBL_ULT(dev_priv)) { > > + } else if (IS_SKL_ULT(dev_priv)) { > > *n_entries = ARRAY_SIZE(skl_u_ddi_translations_dp); > > return skl_u_ddi_translations_dp; > > } else { > > @@ -347,6 +386,21 @@ skl_get_buf_trans_dp(struct drm_i915_private > > *dev_priv, int *n_entries) > > } > > > > static const struct ddi_buf_trans * > > +kbl_get_buf_trans_dp(struct drm_i915_private *dev_priv, int *n_entries) > > +{ > > + if (IS_KBL_ULX(dev_priv)) { > > + *n_entries =
Re: [Intel-gfx] [PATCH 2/2] drm/i915: KBL - Recommended buffer translation programming for DisplayPort
On Fri, 30 Sep 2016, Rodrigo Viviwrote: > According to spec: "KBL re-uses SKL values, except where > specific KBL values are listed." > > And recently spec has changed adding different table for Display Port only. > But for all SKUs (H,S,U,Y) we have slightly different values. > > Cc: Manasi Navare > Cc: Arthur Runyan > Signed-off-by: Rodrigo Vivi > --- > drivers/gpu/drm/i915/intel_ddi.c | 88 > +++- > 1 file changed, 78 insertions(+), 10 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_ddi.c > b/drivers/gpu/drm/i915/intel_ddi.c > index 018964b..1573360 100644 > --- a/drivers/gpu/drm/i915/intel_ddi.c > +++ b/drivers/gpu/drm/i915/intel_ddi.c > @@ -167,8 +167,47 @@ static const struct ddi_buf_trans > skl_y_ddi_translations_dp[] = { > { 0x80005012, 0x00C0, 0x3 }, > }; > > +/* Kabylake H and S */ > +static const struct ddi_buf_trans kbl_ddi_translations_dp[] = { > + { 0x2016, 0x00A0, 0x0 }, > + { 0x5012, 0x009B, 0x0 }, > + { 0x7011, 0x0088, 0x0 }, > + { 0x80009010, 0x00C0, 0x1 }, > + { 0x2016, 0x009B, 0x0 }, > + { 0x5012, 0x0088, 0x0 }, > + { 0x80007011, 0x00C0, 0x1 }, > + { 0x2016, 0x009F, 0x0 }, > + { 0x80005012, 0x00C0, 0x1 }, > +}; > + > +/* Kabylake U */ > +static const struct ddi_buf_trans kbl_u_ddi_translations_dp[] = { > + { 0x201B, 0x00A1, 0x0 }, > + { 0x5012, 0x0088, 0x0 }, > + { 0x80007011, 0x00CD, 0x3 }, > + { 0x80009010, 0x00C0, 0x3 }, > + { 0x201B, 0x009D, 0x0 }, > + { 0x80005012, 0x00C0, 0x3 }, > + { 0x80007011, 0x00C0, 0x3 }, > + { 0x2016, 0x004F, 0x0 }, > + { 0x80005012, 0x00C0, 0x3 }, > +}; > + > +/* Kabylake Y */ > +static const struct ddi_buf_trans kbl_y_ddi_translations_dp[] = { > + { 0x1017, 0x00A1, 0x0 }, > + { 0x5012, 0x0088, 0x0 }, > + { 0x80007011, 0x00CD, 0x3 }, > + { 0x8000800F, 0x00C0, 0x3 }, > + { 0x1017, 0x009D, 0x0 }, > + { 0x80005012, 0x00C0, 0x3 }, > + { 0x80007011, 0x00C0, 0x3 }, > + { 0x1017, 0x004C, 0x0 }, > + { 0x80005012, 0x00C0, 0x3 }, > +}; > + > /* > - * Skylake H and S > + * Skylake/Kabylake H and S > * eDP 1.4 low vswing translation parameters > */ > static const struct ddi_buf_trans skl_ddi_translations_edp[] = { > @@ -185,7 +224,7 @@ static const struct ddi_buf_trans > skl_ddi_translations_edp[] = { > }; > > /* > - * Skylake U > + * Skylake/Kabylake U > * eDP 1.4 low vswing translation parameters > */ > static const struct ddi_buf_trans skl_u_ddi_translations_edp[] = { > @@ -202,7 +241,7 @@ static const struct ddi_buf_trans > skl_u_ddi_translations_edp[] = { > }; > > /* > - * Skylake Y > + * Skylake/Kabylake Y > * eDP 1.4 low vswing translation parameters > */ > static const struct ddi_buf_trans skl_y_ddi_translations_edp[] = { > @@ -218,7 +257,7 @@ static const struct ddi_buf_trans > skl_y_ddi_translations_edp[] = { > { 0x0018, 0x008A, 0x0 }, > }; > > -/* Skylake U, H and S */ > +/* Skylake/Kabylake U, H and S */ > static const struct ddi_buf_trans skl_ddi_translations_hdmi[] = { > { 0x0018, 0x00AC, 0x0 }, > { 0x5012, 0x009D, 0x0 }, > @@ -233,7 +272,7 @@ static const struct ddi_buf_trans > skl_ddi_translations_hdmi[] = { > { 0x8018, 0x00C0, 0x1 }, > }; > > -/* Skylake Y */ > +/* Skylake/Kabylake Y */ > static const struct ddi_buf_trans skl_y_ddi_translations_hdmi[] = { > { 0x0018, 0x00A1, 0x0 }, > { 0x5012, 0x00DF, 0x0 }, > @@ -334,10 +373,10 @@ bdw_get_buf_trans_edp(struct drm_i915_private > *dev_priv, int *n_entries) > static const struct ddi_buf_trans * > skl_get_buf_trans_dp(struct drm_i915_private *dev_priv, int *n_entries) > { > - if (IS_SKL_ULX(dev_priv) || IS_KBL_ULX(dev_priv)) { > + if (IS_SKL_ULX(dev_priv)) { > *n_entries = ARRAY_SIZE(skl_y_ddi_translations_dp); > return skl_y_ddi_translations_dp; > - } else if (IS_SKL_ULT(dev_priv) || IS_KBL_ULT(dev_priv)) { > + } else if (IS_SKL_ULT(dev_priv)) { > *n_entries = ARRAY_SIZE(skl_u_ddi_translations_dp); > return skl_u_ddi_translations_dp; > } else { > @@ -347,6 +386,21 @@ skl_get_buf_trans_dp(struct drm_i915_private *dev_priv, > int *n_entries) > } > > static const struct ddi_buf_trans * > +kbl_get_buf_trans_dp(struct drm_i915_private *dev_priv, int *n_entries) > +{ > + 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)) { > + *n_entries = ARRAY_SIZE(kbl_u_ddi_translations_dp); > + return