drm/i915: Move down skl/kbl ddi iboost and n_edp_entires fixup
Subsystems (2)
Rodrigo Vivi
maintainerPATCH 1/2 drm/i915: Move down skl/kbl ddi iboost and n_edp_entires fixup
No functional change.
Only moving this fixup block out of ddi_translation definitions so we can split skl and kbl cleanly.
--- drivers/gpu/drm/i915/intel_ddi.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +12 -9
@@ -436,15 +436,6 @@ void intel_prepare_dp_ddi_buffers(struct intel_encoder *encoder)skl_get_buf_trans_dp (dev_priv, &n_dp_entries); ddi_translations_edp =skl_get_buf_trans_edp (dev_priv, &n_edp_entries); - -/* If we're boosting the current, set bit 31 of trans1 */ -if (dev_priv->vbt.ddi_port_info[port].dp_boost_level) - iboost_bit =DDI_BUF_BALANCE_LEG_ENABLE ; - -if (WARN_ON (encoder->type ==INTEL_OUTPUT_EDP && - port !=PORT_A && port !=PORT_E && - n_edp_entries >9 )) - n_edp_entries =9 ; }else if (IS_BROADWELL (dev_priv)) { ddi_translations_fdi = bdw_ddi_translations_fdi; ddi_translations_dp = bdw_ddi_translations_dp;
@@ -464,6 +455,18 @@ void intel_prepare_dp_ddi_buffers(struct intel_encoder *encoder) n_dp_entries =ARRAY_SIZE (bdw_ddi_translations_dp); } +/* Skylake/Kabylake iboost and edp_entries fixup */ +if (IS_SKYLAKE (dev_priv) ||IS_KABYLAKE (dev_priv)) { +/* If we're boosting the current, set bit 31 of trans1 */ +if (dev_priv->vbt.ddi_port_info[port].dp_boost_level) + iboost_bit =DDI_BUF_BALANCE_LEG_ENABLE ; + +if (WARN_ON (encoder->type ==INTEL_OUTPUT_EDP && + port !=PORT_A && port !=PORT_E && + n_edp_entries >9 )) + n_edp_entries =9 ; + } +switch (encoder->type) {case INTEL_OUTPUT_EDP : ddi_translations = ddi_translations_edp;
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Rodrigo Vivi
maintainerPATCH 2/2 drm/i915: KBL - Recommended buffer translation programming for DisplayPort
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.
--- drivers/gpu/drm/i915/intel_ddi.c | 88 +++++++++++++++++++++++++++++++++++----- 1 file changed, 78 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +78 -10
@@ -167,8 +167,47 @@ static const struct ddi_buf_trans skl_y_ddi_translations_dp[] = { { 0x80005012, 0x000000C0, 0x3 }, }; +/* Kabylake H and S */ +static const struct ddi_buf_trans kbl_ddi_translations_dp[] = { + {0x00002016 ,0x000000A0 ,0x0 }, + {0x00005012 ,0x0000009B ,0x0 }, + {0x00007011 ,0x00000088 ,0x0 }, + {0x80009010 ,0x000000C0 ,0x1 }, + {0x00002016 ,0x0000009B ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000C0 ,0x1 }, + {0x00002016 ,0x0000009F ,0x0 }, + {0x80005012 ,0x000000C0 ,0x1 }, +}; + +/* Kabylake U */ +static const struct ddi_buf_trans kbl_u_ddi_translations_dp[] = { + {0x0000201B ,0x000000A1 ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000CD ,0x3 }, + {0x80009010 ,0x000000C0 ,0x3 }, + {0x0000201B ,0x0000009D ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, + {0x80007011 ,0x000000C0 ,0x3 }, + {0x00002016 ,0x0000004F ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, +}; + +/* Kabylake Y */ +static const struct ddi_buf_trans kbl_y_ddi_translations_dp[] = { + {0x00001017 ,0x000000A1 ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000CD ,0x3 }, + {0x8000800F ,0x000000C0 ,0x3 }, + {0x00001017 ,0x0000009D ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, + {0x80007011 ,0x000000C0 ,0x3 }, + {0x00001017 ,0x0000004C ,0x0 }, + {0x80005012 ,0x000000C0 ,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[] = { { 0x00000018, 0x0000008A, 0x0 }, }; -/* Skylake U, H and S */ +/* Skylake/Kabylake U, H and S */ static const struct ddi_buf_trans skl_ddi_translations_hdmi[] = { {0x00000018 ,0x000000AC ,0x0 }, { 0x00005012, 0x0000009D, 0x0 },
@@ -233,7 +272,7 @@ static const struct ddi_buf_trans skl_ddi_translations_hdmi[] = { { 0x80000018, 0x000000C0, 0x1 }, }; -/* Skylake Y */ +/* Skylake/Kabylake Y */ static const struct ddi_buf_trans skl_y_ddi_translations_hdmi[] = { {0x00000018 ,0x000000A1 ,0x0 }, { 0x00005012, 0x000000DF, 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 kbl_u_ddi_translations_dp; + }else { + *n_entries =ARRAY_SIZE (kbl_ddi_translations_dp); +return kbl_ddi_translations_dp; + } +} + +static const struct ddi_buf_trans *skl_get_buf_trans_edp (struct drm_i915_private *dev_priv,int *n_entries) {if (dev_priv->vbt.edp.low_vswing) {
@@ -362,7 +416,10 @@ skl_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries) } } -return skl_get_buf_trans_dp (dev_priv, n_entries); +if (dev_priv->vbt.edp.low_vswing) +return kbl_get_buf_trans_dp (dev_priv, n_entries); +else +return skl_get_buf_trans_dp (dev_priv, n_entries); } static const struct ddi_buf_trans *
@@ -430,7 +487,13 @@ void intel_prepare_dp_ddi_buffers(struct intel_encoder *encoder)if (IS_BROXTON (dev_priv))return ; -if (IS_SKYLAKE (dev_priv) ||IS_KABYLAKE (dev_priv)) { +if (IS_KABYLAKE (dev_priv)) { + ddi_translations_fdi =NULL ; + ddi_translations_dp = +kbl_get_buf_trans_dp (dev_priv, &n_dp_entries); + ddi_translations_edp = +skl_get_buf_trans_edp (dev_priv, &n_edp_entries); + }else if (IS_SKYLAKE (dev_priv)) { ddi_translations_fdi =NULL ; ddi_translations_dp =skl_get_buf_trans_dp (dev_priv, &n_dp_entries);
@@ -1437,7 +1500,12 @@ static void skl_ddi_set_iboost(struct intel_encoder *encoder, u32 level)if (dp_iboost) { iboost = dp_iboost; }else { - ddi_translations =skl_get_buf_trans_dp (dev_priv, &n_entries); +if (IS_KABYLAKE (dev_priv)) + ddi_translations =kbl_get_buf_trans_dp (dev_priv, + &n_entries); +else + ddi_translations =skl_get_buf_trans_dp (dev_priv, + &n_entries); iboost = ddi_translations[level].i_boost; } }else if (type ==INTEL_OUTPUT_EDP ) {
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerRe: [PATCH 2/2] drm/i915: KBL - Recommended buffer translation programming for DisplayPort
Quoted 138 lines · Rodrigo Vivi
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 <[email protected]>Cc Arthur Runyan <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 88 +++++++++++++++++++++++++++++++++++----- 1 file changed, 78 insertions(+), 10 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +61
-7@@ -167,8 +167,47 @@ static const struct ddi_buf_trans skl_y_ddi_translations_dp[] = { { 0x80005012, 0x000000C0, 0x3 }, }; +/* Kabylake H and S */ +static const struct ddi_buf_trans kbl_ddi_translations_dp[] = { + {0x00002016 ,0x000000A0 ,0x0 }, + {0x00005012 ,0x0000009B ,0x0 }, + {0x00007011 ,0x00000088 ,0x0 }, + {0x80009010 ,0x000000C0 ,0x1 }, + {0x00002016 ,0x0000009B ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000C0 ,0x1 }, + {0x00002016 ,0x0000009F ,0x0 }, + {0x80005012 ,0x000000C0 ,0x1 }, +}; + +/* Kabylake U */ +static const struct ddi_buf_trans kbl_u_ddi_translations_dp[] = { + {0x0000201B ,0x000000A1 ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000CD ,0x3 }, + {0x80009010 ,0x000000C0 ,0x3 }, + {0x0000201B ,0x0000009D ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, + {0x80007011 ,0x000000C0 ,0x3 }, + {0x00002016 ,0x0000004F ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, +}; + +/* Kabylake Y */ +static const struct ddi_buf_trans kbl_y_ddi_translations_dp[] = { + {0x00001017 ,0x000000A1 ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000CD ,0x3 }, + {0x8000800F ,0x000000C0 ,0x3 }, + {0x00001017 ,0x0000009D ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, + {0x80007011 ,0x000000C0 ,0x3 }, + {0x00001017 ,0x0000004C ,0x0 }, + {0x80005012 ,0x000000C0 ,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[] = { { 0x00000018, 0x0000008A, 0x0 }, }; -/* Skylake U, H and S */ +/* Skylake/Kabylake U, H and S */ static const struct ddi_buf_trans skl_ddi_translations_hdmi[] = { {0x00000018 ,0x000000AC ,0x0 }, { 0x00005012, 0x0000009D, 0x0 },@@ -233,7 +272,7 @@ static const struct ddi_buf_trans skl_ddi_translations_hdmi[] = { { 0x80000018, 0x000000C0, 0x1 }, }; -/* Skylake Y */ +/* Skylake/Kabylake Y */ static const struct ddi_buf_trans skl_y_ddi_translations_hdmi[] = { {0x00000018 ,0x000000A1 ,0x0 }, { 0x00005012, 0x000000DF, 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 kbl_u_ddi_translations_dp; + }else { + *n_entries =ARRAY_SIZE (kbl_ddi_translations_dp); +return kbl_ddi_translations_dp; + } +} + +static const struct ddi_buf_trans *skl_get_buf_trans_edp (struct drm_i915_private *dev_priv,int *n_entries) {if (dev_priv->vbt.edp.low_vswing) {
drivers/gpu/drm/i915/intel_ddi.c skl_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries) · line 422
Quoted 8 lines
drivers/gpu/drm/i915/intel_ddi.c +4
-1@@ -362,7 +416,10 @@ skl_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries) } } -return skl_get_buf_trans_dp (dev_priv, n_entries); +if (dev_priv->vbt.edp.low_vswing) +return kbl_get_buf_trans_dp (dev_priv, n_entries); +else +return skl_get_buf_trans_dp (dev_priv, n_entries);
This seems really confusing.
BR,
Jani.
Quoted 32 lines
drivers/gpu/drm/i915/intel_ddi.c +13
-2} static const struct ddi_buf_trans *@@ -430,7 +487,13 @@ void intel_prepare_dp_ddi_buffers(struct intel_encoder *encoder)if (IS_BROXTON (dev_priv))return ; -if (IS_SKYLAKE (dev_priv) ||IS_KABYLAKE (dev_priv)) { +if (IS_KABYLAKE (dev_priv)) { + ddi_translations_fdi =NULL ; + ddi_translations_dp = +kbl_get_buf_trans_dp (dev_priv, &n_dp_entries); + ddi_translations_edp = +skl_get_buf_trans_edp (dev_priv, &n_edp_entries); + }else if (IS_SKYLAKE (dev_priv)) { ddi_translations_fdi =NULL ; ddi_translations_dp =skl_get_buf_trans_dp (dev_priv, &n_dp_entries);@@ -1437,7 +1500,12 @@ static void skl_ddi_set_iboost(struct intel_encoder *encoder, u32 level)if (dp_iboost) { iboost = dp_iboost; }else { - ddi_translations =skl_get_buf_trans_dp (dev_priv, &n_entries); +if (IS_KABYLAKE (dev_priv)) + ddi_translations =kbl_get_buf_trans_dp (dev_priv, + &n_entries); +else + ddi_translations =skl_get_buf_trans_dp (dev_priv, + &n_entries); iboost = ddi_translations[level].i_boost; } }else if (type ==INTEL_OUTPUT_EDP ) {
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Vivi, Rodrigo
maintainerRe: [PATCH 2/2] drm/i915: KBL - Recommended buffer translation programming for DisplayPort
Quoted 142 lines · Jani Nikula
Quoted 141 lines · Rodrigo Vivi
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 <[email protected]>Cc Arthur Runyan <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 88 +++++++++++++++++++++++++++++++++++----- 1 file changed, 78 insertions(+), 10 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +61
-7@@ -167,8 +167,47 @@ static const struct ddi_buf_trans skl_y_ddi_translations_dp[] = { { 0x80005012, 0x000000C0, 0x3 }, }; +/* Kabylake H and S */ +static const struct ddi_buf_trans kbl_ddi_translations_dp[] = { + {0x00002016 ,0x000000A0 ,0x0 }, + {0x00005012 ,0x0000009B ,0x0 }, + {0x00007011 ,0x00000088 ,0x0 }, + {0x80009010 ,0x000000C0 ,0x1 }, + {0x00002016 ,0x0000009B ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000C0 ,0x1 }, + {0x00002016 ,0x0000009F ,0x0 }, + {0x80005012 ,0x000000C0 ,0x1 }, +}; + +/* Kabylake U */ +static const struct ddi_buf_trans kbl_u_ddi_translations_dp[] = { + {0x0000201B ,0x000000A1 ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000CD ,0x3 }, + {0x80009010 ,0x000000C0 ,0x3 }, + {0x0000201B ,0x0000009D ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, + {0x80007011 ,0x000000C0 ,0x3 }, + {0x00002016 ,0x0000004F ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, +}; + +/* Kabylake Y */ +static const struct ddi_buf_trans kbl_y_ddi_translations_dp[] = { + {0x00001017 ,0x000000A1 ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000CD ,0x3 }, + {0x8000800F ,0x000000C0 ,0x3 }, + {0x00001017 ,0x0000009D ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, + {0x80007011 ,0x000000C0 ,0x3 }, + {0x00001017 ,0x0000004C ,0x0 }, + {0x80005012 ,0x000000C0 ,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[] = { { 0x00000018, 0x0000008A, 0x0 }, }; -/* Skylake U, H and S */ +/* Skylake/Kabylake U, H and S */ static const struct ddi_buf_trans skl_ddi_translations_hdmi[] = { {0x00000018 ,0x000000AC ,0x0 }, { 0x00005012, 0x0000009D, 0x0 },@@ -233,7 +272,7 @@ static const struct ddi_buf_trans skl_ddi_translations_hdmi[] = { { 0x80000018, 0x000000C0, 0x1 }, }; -/* Skylake Y */ +/* Skylake/Kabylake Y */ static const struct ddi_buf_trans skl_y_ddi_translations_hdmi[] = { {0x00000018 ,0x000000A1 ,0x0 }, { 0x00005012, 0x000000DF, 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 kbl_u_ddi_translations_dp; + }else { + *n_entries =ARRAY_SIZE (kbl_ddi_translations_dp); +return kbl_ddi_translations_dp; + } +} + +static const struct ddi_buf_trans *skl_get_buf_trans_edp (struct drm_i915_private *dev_priv,int *n_entries) {if (dev_priv->vbt.edp.low_vswing) {@@ -362,7 +416,10 @@ skl_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries) } }
Quoted 7 lines
drivers/gpu/drm/i915/intel_ddi.c skl_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries) · line 422
Quoted 5 lines
drivers/gpu/drm/i915/intel_ddi.c +4
-1-return skl_get_buf_trans_dp (dev_priv, n_entries); +if (dev_priv->vbt.edp.low_vswing) +return kbl_get_buf_trans_dp (dev_priv, n_entries); +else +return skl_get_buf_trans_dp (dev_priv, n_entries);This seems really confusing.
I agree, but I would like to avoid duplicating the identical tables... those by spec are explicitly same table...
another option without duplicating the tables is duplicating the function like below... what I believe it is still confusing with all those skl and kbl inside this function...
what do you prefer?
static const struct ddi_buf_trans
*kbl_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries)
{
if (dev_priv->vbt.edp.low_vswing)
{
if (IS_KBL_ULX(dev_priv)){
*n_entries =ARRAY_SIZE(skl_y_ddi_translations_edp);
return
skl_y_ddi_translations_edp;
} else if (IS_KBL_ULT(dev_priv)){
*n_entries =ARRAY_SIZE(skl_u_ddi_translations_edp);
return
skl_u_ddi_translations_edp;
} else{
*n_entries =ARRAY_SIZE(skl_ddi_translations_edp);
return
skl_ddi_translations_edp;
}
}
return kbl_get_buf_trans_dp(dev_priv,n_entries);
}
Quoted 29 lines
BR,
Jani.Quoted 24 lines
drivers/gpu/drm/i915/intel_ddi.c +8
-2} static const struct ddi_buf_trans *@@ -430,7 +487,13 @@ void intel_prepare_dp_ddi_buffers(struct intel_encoder *encoder)if (IS_BROXTON (dev_priv))return ; -if (IS_SKYLAKE (dev_priv) ||IS_KABYLAKE (dev_priv)) { +if (IS_KABYLAKE (dev_priv)) { + ddi_translations_fdi =NULL ; + ddi_translations_dp = +kbl_get_buf_trans_dp (dev_priv, &n_dp_entries); + ddi_translations_edp = +skl_get_buf_trans_edp (dev_priv, &n_edp_entries); + }else if (IS_SKYLAKE (dev_priv)) { ddi_translations_fdi =NULL ; ddi_translations_dp =skl_get_buf_trans_dp (dev_priv, &n_dp_entries);@@ -1437,7 +1500,12 @@ static void skl_ddi_set_iboost(struct intel_encoder *encoder, u32 level)if (dp_iboost) { iboost = dp_iboost; }else { - ddi_translations =skl_get_buf_trans_dp (dev_priv, &n_entries); +if (IS_KABYLAKE (dev_priv))
Quoted 9 lines
drivers/gpu/drm/i915/intel_ddi.c static void skl_ddi_set_iboost(struct intel_encoder *encoder, u32 level) · line 1511
Quoted 8 lines
drivers/gpu/drm/i915/intel_ddi.c +5
-0+ ddi_translations =kbl_get_buf_trans_dp (dev_priv, + &n_entries); + else + ddi_translations =skl_get_buf_trans_dp (dev_priv, + &n_entries); iboost = ddi_translations[level].i_boost; } }else if (type ==INTEL_OUTPUT_EDP ) {
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerRe: [PATCH 2/2] drm/i915: KBL - Recommended buffer translation programming for DisplayPort
Quoted 151 lines · Rodrigo
Quoted 142 lines · Jani Nikula
Quoted 141 lines · Rodrigo Vivi
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 <[email protected]>Cc Arthur Runyan <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 88 +++++++++++++++++++++++++++++++++++----- 1 file changed, 78 insertions(+), 10 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +61
-7@@ -167,8 +167,47 @@ static const struct ddi_buf_trans skl_y_ddi_translations_dp[] = { { 0x80005012, 0x000000C0, 0x3 }, }; +/* Kabylake H and S */ +static const struct ddi_buf_trans kbl_ddi_translations_dp[] = { + {0x00002016 ,0x000000A0 ,0x0 }, + {0x00005012 ,0x0000009B ,0x0 }, + {0x00007011 ,0x00000088 ,0x0 }, + {0x80009010 ,0x000000C0 ,0x1 }, + {0x00002016 ,0x0000009B ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000C0 ,0x1 }, + {0x00002016 ,0x0000009F ,0x0 }, + {0x80005012 ,0x000000C0 ,0x1 }, +}; + +/* Kabylake U */ +static const struct ddi_buf_trans kbl_u_ddi_translations_dp[] = { + {0x0000201B ,0x000000A1 ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000CD ,0x3 }, + {0x80009010 ,0x000000C0 ,0x3 }, + {0x0000201B ,0x0000009D ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, + {0x80007011 ,0x000000C0 ,0x3 }, + {0x00002016 ,0x0000004F ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, +}; + +/* Kabylake Y */ +static const struct ddi_buf_trans kbl_y_ddi_translations_dp[] = { + {0x00001017 ,0x000000A1 ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000CD ,0x3 }, + {0x8000800F ,0x000000C0 ,0x3 }, + {0x00001017 ,0x0000009D ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, + {0x80007011 ,0x000000C0 ,0x3 }, + {0x00001017 ,0x0000004C ,0x0 }, + {0x80005012 ,0x000000C0 ,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[] = { { 0x00000018, 0x0000008A, 0x0 }, }; -/* Skylake U, H and S */ +/* Skylake/Kabylake U, H and S */ static const struct ddi_buf_trans skl_ddi_translations_hdmi[] = { {0x00000018 ,0x000000AC ,0x0 }, { 0x00005012, 0x0000009D, 0x0 },@@ -233,7 +272,7 @@ static const struct ddi_buf_trans skl_ddi_translations_hdmi[] = { { 0x80000018, 0x000000C0, 0x1 }, }; -/* Skylake Y */ +/* Skylake/Kabylake Y */ static const struct ddi_buf_trans skl_y_ddi_translations_hdmi[] = { {0x00000018 ,0x000000A1 ,0x0 }, { 0x00005012, 0x000000DF, 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 kbl_u_ddi_translations_dp; + }else { + *n_entries =ARRAY_SIZE (kbl_ddi_translations_dp); +return kbl_ddi_translations_dp; + } +} + +static const struct ddi_buf_trans *skl_get_buf_trans_edp (struct drm_i915_private *dev_priv,int *n_entries) {if (dev_priv->vbt.edp.low_vswing) {@@ -362,7 +416,10 @@ skl_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries) } }Quoted 7 lines
drivers/gpu/drm/i915/intel_ddi.c skl_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries) · line 422
Quoted 5 lines
drivers/gpu/drm/i915/intel_ddi.c +4
-1-return skl_get_buf_trans_dp (dev_priv, n_entries); +if (dev_priv->vbt.edp.low_vswing) +return kbl_get_buf_trans_dp (dev_priv, n_entries); +else +return skl_get_buf_trans_dp (dev_priv, n_entries);This seems really confusing.
Quoted 8 lines
I agree, but I would like to avoid duplicating the identical tables... those by spec are explicitly same table...
another option without duplicating the tables is duplicating the function like below... what I believe it is still confusing with all those skl and kbl inside this function...
what do you prefer?
The thing that bugs me here is that you may return klb_something on skl. We reuse plenty of older gen stuff for newer gens, but this being the other way round is the confusing part. So just call it skl_something, and reuse in kbl?
BR,
Jani.
Quoted 74 lines
static const struct
ddi_buf_trans
*kbl_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries){ if (dev_priv->vbt.edp.low_vswing) { if (IS_KBL_ULX(dev_priv)){
*n_entries=ARRAY_SIZE(skl_y_ddi_translations_edp);
returnskl_y_ddi_translations_edp; } else if (IS_KBL_ULT(dev_priv)){
*n_entries=ARRAY_SIZE(skl_u_ddi_translations_edp);
returnskl_u_ddi_translations_edp; } else{
*n_entries=ARRAY_SIZE(skl_ddi_translations_edp);
returnskl_ddi_translations_edp; } } return kbl_get_buf_trans_dp(dev_priv,
n_entries);
}Quoted 38 lines
BR,
Jani.Quoted 32 lines
drivers/gpu/drm/i915/intel_ddi.c +13
-2} static const struct ddi_buf_trans *@@ -430,7 +487,13 @@ void intel_prepare_dp_ddi_buffers(struct intel_encoder *encoder)if (IS_BROXTON (dev_priv))return ; -if (IS_SKYLAKE (dev_priv) ||IS_KABYLAKE (dev_priv)) { +if (IS_KABYLAKE (dev_priv)) { + ddi_translations_fdi =NULL ; + ddi_translations_dp = +kbl_get_buf_trans_dp (dev_priv, &n_dp_entries); + ddi_translations_edp = +skl_get_buf_trans_edp (dev_priv, &n_edp_entries); + }else if (IS_SKYLAKE (dev_priv)) { ddi_translations_fdi =NULL ; ddi_translations_dp =skl_get_buf_trans_dp (dev_priv, &n_dp_entries);@@ -1437,7 +1500,12 @@ static void skl_ddi_set_iboost(struct intel_encoder *encoder, u32 level)if (dp_iboost) { iboost = dp_iboost; }else { - ddi_translations =skl_get_buf_trans_dp (dev_priv, &n_entries); +if (IS_KABYLAKE (dev_priv)) + ddi_translations =kbl_get_buf_trans_dp (dev_priv, + &n_entries); +else + ddi_translations =skl_get_buf_trans_dp (dev_priv, + &n_entries); iboost = ddi_translations[level].i_boost; } }else if (type ==INTEL_OUTPUT_EDP ) {
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Vivi, Rodrigo
maintainerRe: [PATCH 2/2] drm/i915: KBL - Recommended buffer translation programming for DisplayPort
Quoted 159 lines · Jani Nikula
Quoted 158 lines · Rodrigo
Quoted 142 lines · Jani Nikula
Quoted 141 lines · Rodrigo Vivi
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 <[email protected]>Cc Arthur Runyan <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 88 +++++++++++++++++++++++++++++++++++----- 1 file changed, 78 insertions(+), 10 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +61
-7@@ -167,8 +167,47 @@ static const struct ddi_buf_trans skl_y_ddi_translations_dp[] = { { 0x80005012, 0x000000C0, 0x3 }, }; +/* Kabylake H and S */ +static const struct ddi_buf_trans kbl_ddi_translations_dp[] = { + {0x00002016 ,0x000000A0 ,0x0 }, + {0x00005012 ,0x0000009B ,0x0 }, + {0x00007011 ,0x00000088 ,0x0 }, + {0x80009010 ,0x000000C0 ,0x1 }, + {0x00002016 ,0x0000009B ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000C0 ,0x1 }, + {0x00002016 ,0x0000009F ,0x0 }, + {0x80005012 ,0x000000C0 ,0x1 }, +}; + +/* Kabylake U */ +static const struct ddi_buf_trans kbl_u_ddi_translations_dp[] = { + {0x0000201B ,0x000000A1 ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000CD ,0x3 }, + {0x80009010 ,0x000000C0 ,0x3 }, + {0x0000201B ,0x0000009D ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, + {0x80007011 ,0x000000C0 ,0x3 }, + {0x00002016 ,0x0000004F ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, +}; + +/* Kabylake Y */ +static const struct ddi_buf_trans kbl_y_ddi_translations_dp[] = { + {0x00001017 ,0x000000A1 ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000CD ,0x3 }, + {0x8000800F ,0x000000C0 ,0x3 }, + {0x00001017 ,0x0000009D ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, + {0x80007011 ,0x000000C0 ,0x3 }, + {0x00001017 ,0x0000004C ,0x0 }, + {0x80005012 ,0x000000C0 ,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[] = { { 0x00000018, 0x0000008A, 0x0 }, }; -/* Skylake U, H and S */ +/* Skylake/Kabylake U, H and S */ static const struct ddi_buf_trans skl_ddi_translations_hdmi[] = { {0x00000018 ,0x000000AC ,0x0 }, { 0x00005012, 0x0000009D, 0x0 },@@ -233,7 +272,7 @@ static const struct ddi_buf_trans skl_ddi_translations_hdmi[] = { { 0x80000018, 0x000000C0, 0x1 }, }; -/* Skylake Y */ +/* Skylake/Kabylake Y */ static const struct ddi_buf_trans skl_y_ddi_translations_hdmi[] = { {0x00000018 ,0x000000A1 ,0x0 }, { 0x00005012, 0x000000DF, 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 kbl_u_ddi_translations_dp; + }else { + *n_entries =ARRAY_SIZE (kbl_ddi_translations_dp); +return kbl_ddi_translations_dp; + } +} + +static const struct ddi_buf_trans *skl_get_buf_trans_edp (struct drm_i915_private *dev_priv,int *n_entries) {if (dev_priv->vbt.edp.low_vswing) {@@ -362,7 +416,10 @@ skl_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries) } }Quoted 7 lines
drivers/gpu/drm/i915/intel_ddi.c skl_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries) · line 422
Quoted 5 lines
drivers/gpu/drm/i915/intel_ddi.c +4
-1-return skl_get_buf_trans_dp (dev_priv, n_entries); +if (dev_priv->vbt.edp.low_vswing) +return kbl_get_buf_trans_dp (dev_priv, n_entries); +else +return skl_get_buf_trans_dp (dev_priv, n_entries);This seems really confusing.
I agree, but I would like to avoid duplicating the identical tables... those by spec are explicitly same table...
another option without duplicating the tables is duplicating the function like below... what I believe it is still confusing with all those skl and kbl inside this function...
Quoted 5 lines
Quoted 1 line
what do you prefer?
The thing that bugs me here is that you may return
klb_somethingon skl. We reuse plenty of older gen stuff for newer gens, but this being the other way round is the confusing part.
No, it is not the other way around.
we have many cases of:
void old_function() {IS_NEWER()
do_something();
/*old colde*/
}
Other way around for me would be
a kbl function with IS_SKYLAKE inside...
But I understand what bugs you. I'm also not convinced this option here is the best one, but this is the minimal duplication of code.
The second option is to have to different functions almost identical one for skl and one for kbl and the third one duplicating even the tables.
We just need to decide what level of duplication would be ok.
Quoted 82 lines
So just call it
skl_something, and reuse in kbl?BR,
Jani.Quoted 74 lines
static const struct
ddi_buf_trans
*kbl_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries){ if (dev_priv->vbt.edp.low_vswing) { if (IS_KBL_ULX(dev_priv)){
*n_entries=ARRAY_SIZE(skl_y_ddi_translations_edp);
returnskl_y_ddi_translations_edp; } else if (IS_KBL_ULT(dev_priv)){
*n_entries=ARRAY_SIZE(skl_u_ddi_translations_edp);
returnskl_u_ddi_translations_edp; } else{
*n_entries=ARRAY_SIZE(skl_ddi_translations_edp);
returnskl_ddi_translations_edp; } } return kbl_get_buf_trans_dp(dev_priv,
n_entries);
}Quoted 38 lines
BR,
Jani.Quoted 32 lines
drivers/gpu/drm/i915/intel_ddi.c +13
-2} static const struct ddi_buf_trans *@@ -430,7 +487,13 @@ void intel_prepare_dp_ddi_buffers(struct intel_encoder *encoder)if (IS_BROXTON (dev_priv))return ; -if (IS_SKYLAKE (dev_priv) ||IS_KABYLAKE (dev_priv)) { +if (IS_KABYLAKE (dev_priv)) { + ddi_translations_fdi =NULL ; + ddi_translations_dp = +kbl_get_buf_trans_dp (dev_priv, &n_dp_entries); + ddi_translations_edp = +skl_get_buf_trans_edp (dev_priv, &n_edp_entries); + }else if (IS_SKYLAKE (dev_priv)) { ddi_translations_fdi =NULL ; ddi_translations_dp =skl_get_buf_trans_dp (dev_priv, &n_dp_entries);@@ -1437,7 +1500,12 @@ static void skl_ddi_set_iboost(struct intel_encoder *encoder, u32 level)if (dp_iboost) { iboost = dp_iboost; }else { - ddi_translations =skl_get_buf_trans_dp (dev_priv, &n_entries); +if (IS_KABYLAKE (dev_priv)) + ddi_translations =kbl_get_buf_trans_dp (dev_priv, + &n_entries); +else + ddi_translations =skl_get_buf_trans_dp (dev_priv, + &n_entries); iboost = ddi_translations[level].i_boost; } }else if (type ==INTEL_OUTPUT_EDP ) {
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerRe: [PATCH 2/2] drm/i915: KBL - Recommended buffer translation programming for DisplayPort
Quoted 167 lines · Rodrigo
Quoted 159 lines · Jani Nikula
Quoted 158 lines · Rodrigo
Quoted 142 lines · Jani Nikula
Quoted 141 lines · Rodrigo Vivi
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 <[email protected]>Cc Arthur Runyan <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 88 +++++++++++++++++++++++++++++++++++----- 1 file changed, 78 insertions(+), 10 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +61
-7@@ -167,8 +167,47 @@ static const struct ddi_buf_trans skl_y_ddi_translations_dp[] = { { 0x80005012, 0x000000C0, 0x3 }, }; +/* Kabylake H and S */ +static const struct ddi_buf_trans kbl_ddi_translations_dp[] = { + {0x00002016 ,0x000000A0 ,0x0 }, + {0x00005012 ,0x0000009B ,0x0 }, + {0x00007011 ,0x00000088 ,0x0 }, + {0x80009010 ,0x000000C0 ,0x1 }, + {0x00002016 ,0x0000009B ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000C0 ,0x1 }, + {0x00002016 ,0x0000009F ,0x0 }, + {0x80005012 ,0x000000C0 ,0x1 }, +}; + +/* Kabylake U */ +static const struct ddi_buf_trans kbl_u_ddi_translations_dp[] = { + {0x0000201B ,0x000000A1 ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000CD ,0x3 }, + {0x80009010 ,0x000000C0 ,0x3 }, + {0x0000201B ,0x0000009D ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, + {0x80007011 ,0x000000C0 ,0x3 }, + {0x00002016 ,0x0000004F ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, +}; + +/* Kabylake Y */ +static const struct ddi_buf_trans kbl_y_ddi_translations_dp[] = { + {0x00001017 ,0x000000A1 ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000CD ,0x3 }, + {0x8000800F ,0x000000C0 ,0x3 }, + {0x00001017 ,0x0000009D ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, + {0x80007011 ,0x000000C0 ,0x3 }, + {0x00001017 ,0x0000004C ,0x0 }, + {0x80005012 ,0x000000C0 ,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[] = { { 0x00000018, 0x0000008A, 0x0 }, }; -/* Skylake U, H and S */ +/* Skylake/Kabylake U, H and S */ static const struct ddi_buf_trans skl_ddi_translations_hdmi[] = { {0x00000018 ,0x000000AC ,0x0 }, { 0x00005012, 0x0000009D, 0x0 },@@ -233,7 +272,7 @@ static const struct ddi_buf_trans skl_ddi_translations_hdmi[] = { { 0x80000018, 0x000000C0, 0x1 }, }; -/* Skylake Y */ +/* Skylake/Kabylake Y */ static const struct ddi_buf_trans skl_y_ddi_translations_hdmi[] = { {0x00000018 ,0x000000A1 ,0x0 }, { 0x00005012, 0x000000DF, 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 kbl_u_ddi_translations_dp; + }else { + *n_entries =ARRAY_SIZE (kbl_ddi_translations_dp); +return kbl_ddi_translations_dp; + } +} + +static const struct ddi_buf_trans *skl_get_buf_trans_edp (struct drm_i915_private *dev_priv,int *n_entries) {if (dev_priv->vbt.edp.low_vswing) {@@ -362,7 +416,10 @@ skl_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries) } }Quoted 7 lines
drivers/gpu/drm/i915/intel_ddi.c skl_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries) · line 422
Quoted 5 lines
drivers/gpu/drm/i915/intel_ddi.c +4
-1-return skl_get_buf_trans_dp (dev_priv, n_entries); +if (dev_priv->vbt.edp.low_vswing) +return kbl_get_buf_trans_dp (dev_priv, n_entries); +else +return skl_get_buf_trans_dp (dev_priv, n_entries);This seems really confusing.
I agree, but I would like to avoid duplicating the identical tables... those by spec are explicitly same table...
another option without duplicating the tables is duplicating the function like below... what I believe it is still confusing with all those skl and kbl inside this function...
Quoted 5 lines
Quoted 1 line
what do you prefer?
The thing that bugs me here is that you may return
klb_somethingon skl. We reuse plenty of older gen stuff for newer gens, but this being the other way round is the confusing part.
Quoted 8 lines
No, it is not the other way around.
we have many cases of:
voidold_function(){IS_NEWER()do_something();/*old colde*/
}
It's okay if you explicitly do it like this, but in your patch the condition is edp low_vswing, not platform.
BR,
Jani.
Quoted 95 lines
Other way around for me would be
a kbl function withIS_SKYLAKEinside...But I understand what bugs you. I'm also not convinced this option here is the best one, but this is the minimal duplication of code.
The second option is to have to different functions almost identical one for skl and one for kbl and the third one duplicating even the tables.
We just need to decide what level of duplication would be ok.
Quoted 82 lines
So just call it
skl_something, and reuse in kbl?BR,
Jani.Quoted 74 lines
static const struct
ddi_buf_trans
*kbl_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries){ if (dev_priv->vbt.edp.low_vswing) { if (IS_KBL_ULX(dev_priv)){
*n_entries=ARRAY_SIZE(skl_y_ddi_translations_edp);
returnskl_y_ddi_translations_edp; } else if (IS_KBL_ULT(dev_priv)){
*n_entries=ARRAY_SIZE(skl_u_ddi_translations_edp);
returnskl_u_ddi_translations_edp; } else{
*n_entries=ARRAY_SIZE(skl_ddi_translations_edp);
returnskl_ddi_translations_edp; } } return kbl_get_buf_trans_dp(dev_priv,
n_entries);
}Quoted 38 lines
BR,
Jani.Quoted 32 lines
drivers/gpu/drm/i915/intel_ddi.c +13
-2} static const struct ddi_buf_trans *@@ -430,7 +487,13 @@ void intel_prepare_dp_ddi_buffers(struct intel_encoder *encoder)if (IS_BROXTON (dev_priv))return ; -if (IS_SKYLAKE (dev_priv) ||IS_KABYLAKE (dev_priv)) { +if (IS_KABYLAKE (dev_priv)) { + ddi_translations_fdi =NULL ; + ddi_translations_dp = +kbl_get_buf_trans_dp (dev_priv, &n_dp_entries); + ddi_translations_edp = +skl_get_buf_trans_edp (dev_priv, &n_edp_entries); + }else if (IS_SKYLAKE (dev_priv)) { ddi_translations_fdi =NULL ; ddi_translations_dp =skl_get_buf_trans_dp (dev_priv, &n_dp_entries);@@ -1437,7 +1500,12 @@ static void skl_ddi_set_iboost(struct intel_encoder *encoder, u32 level)if (dp_iboost) { iboost = dp_iboost; }else { - ddi_translations =skl_get_buf_trans_dp (dev_priv, &n_entries); +if (IS_KABYLAKE (dev_priv)) + ddi_translations =kbl_get_buf_trans_dp (dev_priv, + &n_entries); +else + ddi_translations =skl_get_buf_trans_dp (dev_priv, + &n_entries); iboost = ddi_translations[level].i_boost; } }else if (type ==INTEL_OUTPUT_EDP ) {
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Rodrigo Vivi
maintainerPATCH 1/1 drm/i915: KBL - Recommended buffer translation programming for DisplayPort
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.
v2: Fix wrong condition spotted by Jani.
--- drivers/gpu/drm/i915/intel_ddi.c | 88 +++++++++++++++++++++++++++++++++++----- 1 file changed, 78 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +78 -10
@@ -167,8 +167,47 @@ static const struct ddi_buf_trans skl_y_ddi_translations_dp[] = { { 0x80005012, 0x000000C0, 0x3 }, }; +/* Kabylake H and S */ +static const struct ddi_buf_trans kbl_ddi_translations_dp[] = { + {0x00002016 ,0x000000A0 ,0x0 }, + {0x00005012 ,0x0000009B ,0x0 }, + {0x00007011 ,0x00000088 ,0x0 }, + {0x80009010 ,0x000000C0 ,0x1 }, + {0x00002016 ,0x0000009B ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000C0 ,0x1 }, + {0x00002016 ,0x0000009F ,0x0 }, + {0x80005012 ,0x000000C0 ,0x1 }, +}; + +/* Kabylake U */ +static const struct ddi_buf_trans kbl_u_ddi_translations_dp[] = { + {0x0000201B ,0x000000A1 ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000CD ,0x3 }, + {0x80009010 ,0x000000C0 ,0x3 }, + {0x0000201B ,0x0000009D ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, + {0x80007011 ,0x000000C0 ,0x3 }, + {0x00002016 ,0x0000004F ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, +}; + +/* Kabylake Y */ +static const struct ddi_buf_trans kbl_y_ddi_translations_dp[] = { + {0x00001017 ,0x000000A1 ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000CD ,0x3 }, + {0x8000800F ,0x000000C0 ,0x3 }, + {0x00001017 ,0x0000009D ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, + {0x80007011 ,0x000000C0 ,0x3 }, + {0x00001017 ,0x0000004C ,0x0 }, + {0x80005012 ,0x000000C0 ,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[] = { { 0x00000018, 0x0000008A, 0x0 }, }; -/* Skylake U, H and S */ +/* Skylake/Kabylake U, H and S */ static const struct ddi_buf_trans skl_ddi_translations_hdmi[] = { {0x00000018 ,0x000000AC ,0x0 }, { 0x00005012, 0x0000009D, 0x0 },
@@ -233,7 +272,7 @@ static const struct ddi_buf_trans skl_ddi_translations_hdmi[] = { { 0x80000018, 0x000000C0, 0x1 }, }; -/* Skylake Y */ +/* Skylake/Kabylake Y */ static const struct ddi_buf_trans skl_y_ddi_translations_hdmi[] = { {0x00000018 ,0x000000A1 ,0x0 }, { 0x00005012, 0x000000DF, 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 kbl_u_ddi_translations_dp; + }else { + *n_entries =ARRAY_SIZE (kbl_ddi_translations_dp); +return kbl_ddi_translations_dp; + } +} + +static const struct ddi_buf_trans *skl_get_buf_trans_edp (struct drm_i915_private *dev_priv,int *n_entries) {if (dev_priv->vbt.edp.low_vswing) {
@@ -362,7 +416,10 @@ skl_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries) } } -return skl_get_buf_trans_dp (dev_priv, n_entries); +if (IS_KABYLAKE (dev_priv)) +return kbl_get_buf_trans_dp (dev_priv, n_entries); +else +return skl_get_buf_trans_dp (dev_priv, n_entries); } static const struct ddi_buf_trans *
@@ -430,7 +487,13 @@ void intel_prepare_dp_ddi_buffers(struct intel_encoder *encoder)if (IS_BROXTON (dev_priv))return ; -if (IS_SKYLAKE (dev_priv) ||IS_KABYLAKE (dev_priv)) { +if (IS_KABYLAKE (dev_priv)) { + ddi_translations_fdi =NULL ; + ddi_translations_dp = +kbl_get_buf_trans_dp (dev_priv, &n_dp_entries); + ddi_translations_edp = +skl_get_buf_trans_edp (dev_priv, &n_edp_entries); + }else if (IS_SKYLAKE (dev_priv)) { ddi_translations_fdi =NULL ; ddi_translations_dp =skl_get_buf_trans_dp (dev_priv, &n_dp_entries);
@@ -1434,7 +1497,12 @@ static void skl_ddi_set_iboost(struct intel_encoder *encoder, u32 level)if (dp_iboost) { iboost = dp_iboost; }else { - ddi_translations =skl_get_buf_trans_dp (dev_priv, &n_entries); +if (IS_KABYLAKE (dev_priv)) + ddi_translations =kbl_get_buf_trans_dp (dev_priv, + &n_entries); +else + ddi_translations =skl_get_buf_trans_dp (dev_priv, + &n_entries); iboost = ddi_translations[level].i_boost; } }else if (type ==INTEL_OUTPUT_EDP ) {
Signature · 6 lines
2.5.5 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH] drm/i915: KBL - Recommended buffer translation programming for DisplayPort
Quoted 23 lines · Rodrigo Vivi
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.
v2: Fix wrong condition spotted by Jani.
Cc Jani Nikula <[email protected]>Cc Manasi Navare <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 88 +++++++++++++++++++++++++++++++++++----- 1 file changed, 78 insertions(+), 10 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +0
-0@@ -167,8 +167,47 @@ static const struct ddi_buf_trans skl_y_ddi_translations_dp[] = { { 0x80005012, 0x000000C0, 0x3 }, };
drivers/gpu/drm/i915/intel_ddi.c static const struct ddi_buf_trans skl_y_ddi_translations_dp[] = { · line 179
Quoted 10 lines
drivers/gpu/drm/i915/intel_ddi.c +10
-0+/* Kabylake H and S */ +static const struct ddi_buf_trans kbl_ddi_translations_dp[] = { + {0x00002016 ,0x000000A0 ,0x0 }, + {0x00005012 ,0x0000009B ,0x0 }, + {0x00007011 ,0x00000088 ,0x0 }, + {0x80009010 ,0x000000C0 ,0x1 }, + {0x00002016 ,0x0000009B ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000C0 ,0x1 }, + {0x00002016 ,0x0000009F ,0x0 },
This entry according to the Bspec should be 0x00002016, 0x00000097, 0x0
Manasi
Quoted 150 lines
drivers/gpu/drm/i915/intel_ddi.c +68
-10+ { 0x80005012, 0x000000C0, 0x1 }, +}; + +/* Kabylake U */ +static const struct ddi_buf_trans kbl_u_ddi_translations_dp[] = { + {0x0000201B ,0x000000A1 ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000CD ,0x3 }, + {0x80009010 ,0x000000C0 ,0x3 }, + {0x0000201B ,0x0000009D ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, + {0x80007011 ,0x000000C0 ,0x3 }, + {0x00002016 ,0x0000004F ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, +}; + +/* Kabylake Y */ +static const struct ddi_buf_trans kbl_y_ddi_translations_dp[] = { + {0x00001017 ,0x000000A1 ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000CD ,0x3 }, + {0x8000800F ,0x000000C0 ,0x3 }, + {0x00001017 ,0x0000009D ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, + {0x80007011 ,0x000000C0 ,0x3 }, + {0x00001017 ,0x0000004C ,0x0 }, + {0x80005012 ,0x000000C0 ,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[] = { { 0x00000018, 0x0000008A, 0x0 }, }; -/* Skylake U, H and S */ +/* Skylake/Kabylake U, H and S */ static const struct ddi_buf_trans skl_ddi_translations_hdmi[] = { {0x00000018 ,0x000000AC ,0x0 }, { 0x00005012, 0x0000009D, 0x0 },@@ -233,7 +272,7 @@ static const struct ddi_buf_trans skl_ddi_translations_hdmi[] = { { 0x80000018, 0x000000C0, 0x1 }, }; -/* Skylake Y */ +/* Skylake/Kabylake Y */ static const struct ddi_buf_trans skl_y_ddi_translations_hdmi[] = { {0x00000018 ,0x000000A1 ,0x0 }, { 0x00005012, 0x000000DF, 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 kbl_u_ddi_translations_dp; + }else { + *n_entries =ARRAY_SIZE (kbl_ddi_translations_dp); +return kbl_ddi_translations_dp; + } +} + +static const struct ddi_buf_trans *skl_get_buf_trans_edp (struct drm_i915_private *dev_priv,int *n_entries) {if (dev_priv->vbt.edp.low_vswing) {@@ -362,7 +416,10 @@ skl_get_buf_trans_edp(struct drm_i915_private *dev_priv, int *n_entries) } } -return skl_get_buf_trans_dp (dev_priv, n_entries); +if (IS_KABYLAKE (dev_priv)) +return kbl_get_buf_trans_dp (dev_priv, n_entries); +else +return skl_get_buf_trans_dp (dev_priv, n_entries); } static const struct ddi_buf_trans *@@ -430,7 +487,13 @@ void intel_prepare_dp_ddi_buffers(struct intel_encoder *encoder)if (IS_BROXTON (dev_priv))return ; -if (IS_SKYLAKE (dev_priv) ||IS_KABYLAKE (dev_priv)) { +if (IS_KABYLAKE (dev_priv)) { + ddi_translations_fdi =NULL ; + ddi_translations_dp = +kbl_get_buf_trans_dp (dev_priv, &n_dp_entries); + ddi_translations_edp = +skl_get_buf_trans_edp (dev_priv, &n_edp_entries); + }else if (IS_SKYLAKE (dev_priv)) { ddi_translations_fdi =NULL ; ddi_translations_dp =skl_get_buf_trans_dp (dev_priv, &n_dp_entries);@@ -1434,7 +1497,12 @@ static void skl_ddi_set_iboost(struct intel_encoder *encoder, u32 level)if (dp_iboost) { iboost = dp_iboost; }else { - ddi_translations =skl_get_buf_trans_dp (dev_priv, &n_entries); +if (IS_KABYLAKE (dev_priv)) + ddi_translations =kbl_get_buf_trans_dp (dev_priv, + &n_entries); +else + ddi_translations =skl_get_buf_trans_dp (dev_priv, + &n_entries); iboost = ddi_translations[level].i_boost; } }else if (type ==INTEL_OUTPUT_EDP ) {Signature · 1 line
2.5.5
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Rodrigo Vivi
maintainerPATCH 1/1 drm/i915: KBL - Recommended buffer translation programming for DisplayPort
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.
v2: Fix wrong condition spotted by Jani.
v3: Fix 7th entry of KBL H and S table - by Manasi.
--- drivers/gpu/drm/i915/intel_ddi.c | 88 +++++++++++++++++++++++++++++++++++----- 1 file changed, 78 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +78 -10
@@ -167,8 +167,47 @@ struct ddi_buf_trans { { 0x80005012, 0x000000C0, 0x3 }, }; +/* Kabylake H and S */ +static const struct ddi_buf_trans kbl_ddi_translations_dp[] = { + {0x00002016 ,0x000000A0 ,0x0 }, + {0x00005012 ,0x0000009B ,0x0 }, + {0x00007011 ,0x00000088 ,0x0 }, + {0x80009010 ,0x000000C0 ,0x1 }, + {0x00002016 ,0x0000009B ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000C0 ,0x1 }, + {0x00002016 ,0x00000097 ,0x0 }, + {0x80005012 ,0x000000C0 ,0x1 }, +}; + +/* Kabylake U */ +static const struct ddi_buf_trans kbl_u_ddi_translations_dp[] = { + {0x0000201B ,0x000000A1 ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000CD ,0x3 }, + {0x80009010 ,0x000000C0 ,0x3 }, + {0x0000201B ,0x0000009D ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, + {0x80007011 ,0x000000C0 ,0x3 }, + {0x00002016 ,0x0000004F ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, +}; + +/* Kabylake Y */ +static const struct ddi_buf_trans kbl_y_ddi_translations_dp[] = { + {0x00001017 ,0x000000A1 ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000CD ,0x3 }, + {0x8000800F ,0x000000C0 ,0x3 }, + {0x00001017 ,0x0000009D ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, + {0x80007011 ,0x000000C0 ,0x3 }, + {0x00001017 ,0x0000004C ,0x0 }, + {0x80005012 ,0x000000C0 ,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 @@ struct ddi_buf_trans { };/* -* 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 @@ struct ddi_buf_trans { };/* -* 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 @@ struct ddi_buf_trans { { 0x00000018, 0x0000008A, 0x0 }, }; -/* Skylake U, H and S */ +/* Skylake/Kabylake U, H and S */ static const struct ddi_buf_trans skl_ddi_translations_hdmi[] = { {0x00000018 ,0x000000AC ,0x0 }, { 0x00005012, 0x0000009D, 0x0 },
@@ -233,7 +272,7 @@ struct ddi_buf_trans { { 0x80000018, 0x000000C0, 0x1 }, }; -/* Skylake Y */ +/* Skylake/Kabylake Y */ static const struct ddi_buf_trans skl_y_ddi_translations_hdmi[] = { {0x00000018 ,0x000000A1 ,0x0 }, { 0x00005012, 0x000000DF, 0x0 },
@@ -334,10 +373,10 @@ enum port intel_ddi_get_encoder_port(struct intel_encoder *encoder)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 @@ enum port intel_ddi_get_encoder_port(struct intel_encoder *encoder) }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 kbl_u_ddi_translations_dp; + }else { + *n_entries =ARRAY_SIZE (kbl_ddi_translations_dp); +return kbl_ddi_translations_dp; + } +} + +static const struct ddi_buf_trans *skl_get_buf_trans_edp (struct drm_i915_private *dev_priv,int *n_entries) {if (dev_priv->vbt.edp.low_vswing) {
@@ -362,7 +416,10 @@ enum port intel_ddi_get_encoder_port(struct intel_encoder *encoder) } } -return skl_get_buf_trans_dp (dev_priv, n_entries); +if (IS_KABYLAKE (dev_priv)) +return kbl_get_buf_trans_dp (dev_priv, n_entries); +else +return skl_get_buf_trans_dp (dev_priv, n_entries); } static const struct ddi_buf_trans *
@@ -430,7 +487,13 @@ void intel_prepare_dp_ddi_buffers(struct intel_encoder *encoder)if (IS_BROXTON (dev_priv))return ; -if (IS_SKYLAKE (dev_priv) ||IS_KABYLAKE (dev_priv)) { +if (IS_KABYLAKE (dev_priv)) { + ddi_translations_fdi =NULL ; + ddi_translations_dp = +kbl_get_buf_trans_dp (dev_priv, &n_dp_entries); + ddi_translations_edp = +skl_get_buf_trans_edp (dev_priv, &n_edp_entries); + }else if (IS_SKYLAKE (dev_priv)) { ddi_translations_fdi =NULL ; ddi_translations_dp =skl_get_buf_trans_dp (dev_priv, &n_dp_entries);
@@ -1437,7 +1500,12 @@ static void skl_ddi_set_iboost(struct intel_encoder *encoder, u32 level)if (dp_iboost) { iboost = dp_iboost; }else { - ddi_translations =skl_get_buf_trans_dp (dev_priv, &n_entries); +if (IS_KABYLAKE (dev_priv)) + ddi_translations =kbl_get_buf_trans_dp (dev_priv, + &n_entries); +else + ddi_translations =skl_get_buf_trans_dp (dev_priv, + &n_entries); iboost = ddi_translations[level].i_boost; } }else if (type ==INTEL_OUTPUT_EDP ) {
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH] drm/i915: KBL - Recommended buffer translation programming for DisplayPort
Quoted 6 lines · Rodrigo Vivi
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.
Quoted 6 lines
v2: Fix wrong condition spotted by Jani.
v3: Fix 7th entry of KBL H and S table - by Manasi.Cc Jani Nikula <[email protected]>Cc Manasi Navare <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>
Quoted 172 lines
--- drivers/gpu/drm/i915/intel_ddi.c | 88 +++++++++++++++++++++++++++++++++++----- 1 file changed, 78 insertions(+), 10 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +78
-10@@ -167,8 +167,47 @@ struct ddi_buf_trans { { 0x80005012, 0x000000C0, 0x3 }, }; +/* Kabylake H and S */ +static const struct ddi_buf_trans kbl_ddi_translations_dp[] = { + {0x00002016 ,0x000000A0 ,0x0 }, + {0x00005012 ,0x0000009B ,0x0 }, + {0x00007011 ,0x00000088 ,0x0 }, + {0x80009010 ,0x000000C0 ,0x1 }, + {0x00002016 ,0x0000009B ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000C0 ,0x1 }, + {0x00002016 ,0x00000097 ,0x0 }, + {0x80005012 ,0x000000C0 ,0x1 }, +}; + +/* Kabylake U */ +static const struct ddi_buf_trans kbl_u_ddi_translations_dp[] = { + {0x0000201B ,0x000000A1 ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000CD ,0x3 }, + {0x80009010 ,0x000000C0 ,0x3 }, + {0x0000201B ,0x0000009D ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, + {0x80007011 ,0x000000C0 ,0x3 }, + {0x00002016 ,0x0000004F ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, +}; + +/* Kabylake Y */ +static const struct ddi_buf_trans kbl_y_ddi_translations_dp[] = { + {0x00001017 ,0x000000A1 ,0x0 }, + {0x00005012 ,0x00000088 ,0x0 }, + {0x80007011 ,0x000000CD ,0x3 }, + {0x8000800F ,0x000000C0 ,0x3 }, + {0x00001017 ,0x0000009D ,0x0 }, + {0x80005012 ,0x000000C0 ,0x3 }, + {0x80007011 ,0x000000C0 ,0x3 }, + {0x00001017 ,0x0000004C ,0x0 }, + {0x80005012 ,0x000000C0 ,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 @@ struct ddi_buf_trans { };/* -* 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 @@ struct ddi_buf_trans { };/* -* 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 @@ struct ddi_buf_trans { { 0x00000018, 0x0000008A, 0x0 }, }; -/* Skylake U, H and S */ +/* Skylake/Kabylake U, H and S */ static const struct ddi_buf_trans skl_ddi_translations_hdmi[] = { {0x00000018 ,0x000000AC ,0x0 }, { 0x00005012, 0x0000009D, 0x0 },@@ -233,7 +272,7 @@ struct ddi_buf_trans { { 0x80000018, 0x000000C0, 0x1 }, }; -/* Skylake Y */ +/* Skylake/Kabylake Y */ static const struct ddi_buf_trans skl_y_ddi_translations_hdmi[] = { {0x00000018 ,0x000000A1 ,0x0 }, { 0x00005012, 0x000000DF, 0x0 },@@ -334,10 +373,10 @@ enum port intel_ddi_get_encoder_port(struct intel_encoder *encoder)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 @@ enum port intel_ddi_get_encoder_port(struct intel_encoder *encoder) }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 kbl_u_ddi_translations_dp; + }else { + *n_entries =ARRAY_SIZE (kbl_ddi_translations_dp); +return kbl_ddi_translations_dp; + } +} + +static const struct ddi_buf_trans *skl_get_buf_trans_edp (struct drm_i915_private *dev_priv,int *n_entries) {if (dev_priv->vbt.edp.low_vswing) {@@ -362,7 +416,10 @@ enum port intel_ddi_get_encoder_port(struct intel_encoder *encoder) } } -return skl_get_buf_trans_dp (dev_priv, n_entries); +if (IS_KABYLAKE (dev_priv)) +return kbl_get_buf_trans_dp (dev_priv, n_entries); +else +return skl_get_buf_trans_dp (dev_priv, n_entries); } static const struct ddi_buf_trans *@@ -430,7 +487,13 @@ void intel_prepare_dp_ddi_buffers(struct intel_encoder *encoder)if (IS_BROXTON (dev_priv))return ; -if (IS_SKYLAKE (dev_priv) ||IS_KABYLAKE (dev_priv)) { +if (IS_KABYLAKE (dev_priv)) { + ddi_translations_fdi =NULL ; + ddi_translations_dp = +kbl_get_buf_trans_dp (dev_priv, &n_dp_entries); + ddi_translations_edp = +skl_get_buf_trans_edp (dev_priv, &n_edp_entries); + }else if (IS_SKYLAKE (dev_priv)) { ddi_translations_fdi =NULL ; ddi_translations_dp =skl_get_buf_trans_dp (dev_priv, &n_dp_entries);@@ -1437,7 +1500,12 @@ static void skl_ddi_set_iboost(struct intel_encoder *encoder, u32 level)if (dp_iboost) { iboost = dp_iboost; }else { - ddi_translations =skl_get_buf_trans_dp (dev_priv, &n_entries); +if (IS_KABYLAKE (dev_priv)) + ddi_translations =kbl_get_buf_trans_dp (dev_priv, + &n_entries); +else + ddi_translations =skl_get_buf_trans_dp (dev_priv, + &n_entries); iboost = ddi_translations[level].i_boost; } }else if (type ==INTEL_OUTPUT_EDP ) {Signature · 1 line
1.9.1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915: Move down skl/kbl ddi iboost and n_edp_entires fixup
In reply to Rodrigo Vivi== Series Details ==
== Series Details ==
Series: series starting with [1/2] drm/i915: Move down skl/kbl ddi iboost and n_edp_entires fixup
URL : https://patchwork.freedesktop.org/series/13171/
State : warning
== Summary ==
Series 13171v1 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/13171/revisions/1/mbox/
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
pass -> DMESG-WARN (fi-byt-j1900)
Subgroup suspend-read-crc-pipe-b:
pass -> DMESG-WARN (fi-ilk-650)
pass -> DMESG-WARN (fi-byt-j1900)fi-bdw-5557u total:244 pass:229 dwarn:0 dfail:0 fail:0 skip:15 fi-bsw-n3050 total:244 pass:202 dwarn:0 dfail:0 fail:0 skip:42 fi-bxt-t5700 total:244 pass:214 dwarn:0 dfail:0 fail:0 skip:30 fi-byt-j1900 total:244 pass:210 dwarn:2 dfail:0 fail:1 skip:31 fi-byt-n2820 total:244 pass:208 dwarn:0 dfail:0 fail:1 skip:35 fi-hsw-4770 total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22 fi-hsw-4770r total:244 pass:222 dwarn:0 dfail:0 fail:0 skip:22 fi-ilk-650 total:244 pass:181 dwarn:1 dfail:0 fail:2 skip:60 fi-ivb-3520m total:244 pass:219 dwarn:0 dfail:0 fail:0 skip:25 fi-ivb-3770 total:244 pass:207 dwarn:0 dfail:0 fail:0 skip:37 fi-skl-6260u total:244 pass:230 dwarn:0 dfail:0 fail:0 skip:14 fi-skl-6700hq total:244 pass:221 dwarn:1 dfail:0 fail:0 skip:22 fi-skl-6700k total:244 pass:219 dwarn:1 dfail:0 fail:0 skip:24 fi-skl-6770hq total:244 pass:228 dwarn:1 dfail:0 fail:1 skip:14 fi-snb-2520m total:244 pass:208 dwarn:0 dfail:0 fail:0 skip:36 fi-snb-2600 total:244 pass:207 dwarn:0 dfail:0 fail:0 skip:37
Results at /archive/results/CI_IGT_test/Patchwork_2609/
d0534bd0217c83c083ba146b9c987e19b219e0e4 drm-intel-nightly: 2016y-09m-30d-10h-31m-00s UTC integration manifest a35dc98 drm/i915: KBL - Recommended buffer translation programming for DisplayPort
f7ed533 drm/i915: Move down skl/kbl ddi iboost and n_edp_entires fixup
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915: Move down skl/kbl ddi iboost and n_edp_entires fixup (rev2)
In reply to Rodrigo Vivi== Series Details ==
== Series Details ==
Series: series starting with [1/2] drm/i915: Move down skl/kbl ddi iboost and n_edp_entires fixup (rev2)
URL : https://patchwork.freedesktop.org/series/13171/
State : warning
== Summary ==
Series 13171v2 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/13171/revisions/2/mbox/
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
dmesg-warn -> PASS (fi-byt-j1900)
Test kms_psr_sink_crc:
Subgroup psr_basic:
pass -> DMESG-WARN (fi-skl-6700hq)fi-bdw-5557u total:248 pass:231 dwarn:0 dfail:0 fail:0 skip:17 fi-bsw-n3050 total:248 pass:204 dwarn:0 dfail:0 fail:0 skip:44 fi-bxt-t5700 total:248 pass:217 dwarn:0 dfail:0 fail:0 skip:31 fi-byt-j1900 total:248 pass:214 dwarn:1 dfail:0 fail:1 skip:32 fi-byt-n2820 total:248 pass:210 dwarn:0 dfail:0 fail:1 skip:37 fi-hsw-4770 total:248 pass:225 dwarn:0 dfail:0 fail:0 skip:23 fi-hsw-4770r total:248 pass:224 dwarn:0 dfail:0 fail:0 skip:24 fi-ilk-650 total:248 pass:184 dwarn:0 dfail:0 fail:2 skip:62 fi-ivb-3520m total:248 pass:221 dwarn:0 dfail:0 fail:0 skip:27 fi-ivb-3770 total:248 pass:207 dwarn:0 dfail:0 fail:0 skip:41 fi-kbl-7200u total:248 pass:222 dwarn:0 dfail:0 fail:0 skip:26 fi-skl-6260u total:248 pass:232 dwarn:0 dfail:0 fail:0 skip:16 fi-skl-6700hq total:248 pass:224 dwarn:1 dfail:0 fail:0 skip:23 fi-skl-6700k total:248 pass:222 dwarn:1 dfail:0 fail:0 skip:25 fi-skl-6770hq total:248 pass:231 dwarn:1 dfail:0 fail:1 skip:15 fi-snb-2520m total:248 pass:211 dwarn:0 dfail:0 fail:0 skip:37 fi-snb-2600 total:248 pass:209 dwarn:0 dfail:0 fail:0 skip:39
Results at /archive/results/CI_IGT_test/Patchwork_2642/
2dff18acaa95a26b882a5f9910d7ded514f18415 drm-intel-nightly: 2016y-10m-05d-13h-58m-08s UTC integration manifest e5be0d6 drm/i915: KBL - Recommended buffer translation programming for DisplayPort
0d4fd49 drm/i915: Move down skl/kbl ddi iboost and n_edp_entires fixup
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 6 lines · Rodrigo Vivi
No functional change.
Only moving this fixup block out ofddi_translationdefinitions so we can split skl and kbl cleanly.Cc Manasi Navare <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]
Quoted 47 lines
--- drivers/gpu/drm/i915/intel_ddi.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +12
-9@@ -436,15 +436,6 @@ void intel_prepare_dp_ddi_buffers(struct intel_encoder *encoder)skl_get_buf_trans_dp (dev_priv, &n_dp_entries); ddi_translations_edp =skl_get_buf_trans_edp (dev_priv, &n_edp_entries); - -/* If we're boosting the current, set bit 31 of trans1 */ -if (dev_priv->vbt.ddi_port_info[port].dp_boost_level) - iboost_bit =DDI_BUF_BALANCE_LEG_ENABLE ; - -if (WARN_ON (encoder->type ==INTEL_OUTPUT_EDP && - port !=PORT_A && port !=PORT_E && - n_edp_entries >9 )) - n_edp_entries =9 ; }else if (IS_BROADWELL (dev_priv)) { ddi_translations_fdi = bdw_ddi_translations_fdi; ddi_translations_dp = bdw_ddi_translations_dp;@@ -464,6 +455,18 @@ void intel_prepare_dp_ddi_buffers(struct intel_encoder *encoder) n_dp_entries =ARRAY_SIZE (bdw_ddi_translations_dp); } +/* Skylake/Kabylake iboost and edp_entries fixup */ +if (IS_SKYLAKE (dev_priv) ||IS_KABYLAKE (dev_priv)) { +/* If we're boosting the current, set bit 31 of trans1 */ +if (dev_priv->vbt.ddi_port_info[port].dp_boost_level) + iboost_bit =DDI_BUF_BALANCE_LEG_ENABLE ; + +if (WARN_ON (encoder->type ==INTEL_OUTPUT_EDP && + port !=PORT_A && port !=PORT_E && + n_edp_entries >9 )) + n_edp_entries =9 ; + } +switch (encoder->type) {case INTEL_OUTPUT_EDP : ddi_translations = ddi_translations_edp;Signature · 1 line
1.9.1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx