From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> Raise the abstraction level of the get_buf_trans() functions a bit more by returning the whole wrapper intel_ddi_buf_trans struct. Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> --- drivers/gpu/drm/i915/display/intel_ddi.c | 76 +++++++-------- .../drm/i915/display/intel_ddi_buf_trans.c | 94 +++++++++---------- .../drm/i915/display/intel_ddi_buf_trans.h | 20 ++-- 3 files changed, 95 insertions(+), 95 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c index fd2dff10fc83..5ac31bd13b3e 100644 --- a/drivers/gpu/drm/i915/display/intel_ddi.c +++ b/drivers/gpu/drm/i915/display/intel_ddi.c @@ -100,7 +100,7 @@ void hsw_prepare_dp_ddi_buffers(struct intel_encoder *encoder, u32 iboost_bit = 0; int i, n_entries; enum port port = encoder->port; - const union intel_ddi_buf_trans_entry *ddi_translations; + const struct intel_ddi_buf_trans *ddi_translations; ddi_translations = hsw_get_buf_trans(encoder, crtc_state, &n_entries); @@ -114,9 +114,9 @@ void hsw_prepare_dp_ddi_buffers(struct intel_encoder *encoder, for (i = 0; i < n_entries; i++) { intel_de_write(dev_priv, DDI_BUF_TRANS_LO(port, i), - ddi_translations[i].hsw.trans1 | iboost_bit); + ddi_translations->entries[i].hsw.trans1 | iboost_bit); intel_de_write(dev_priv, DDI_BUF_TRANS_HI(port, i), - ddi_translations[i].hsw.trans2); + ddi_translations->entries[i].hsw.trans2); } } @@ -133,7 +133,7 @@ static void hsw_prepare_hdmi_ddi_buffers(struct intel_encoder *encoder, u32 iboost_bit = 0; int n_entries; enum port port = encoder->port; - const union intel_ddi_buf_trans_entry *ddi_translations; + const struct intel_ddi_buf_trans *ddi_translations; ddi_translations = hsw_get_buf_trans(encoder, crtc_state, &n_entries); @@ -149,9 +149,9 @@ static void hsw_prepare_hdmi_ddi_buffers(struct intel_encoder *encoder, /* Entry 9 is for HDMI: */ intel_de_write(dev_priv, DDI_BUF_TRANS_LO(port, 9), - ddi_translations[level].hsw.trans1 | iboost_bit); + ddi_translations->entries[level].hsw.trans1 | iboost_bit); intel_de_write(dev_priv, DDI_BUF_TRANS_HI(port, 9), - ddi_translations[level].hsw.trans2); + ddi_translations->entries[level].hsw.trans2); } void intel_wait_ddi_buf_idle(struct drm_i915_private *dev_priv, @@ -908,7 +908,7 @@ static void skl_ddi_set_iboost(struct intel_encoder *encoder, iboost = intel_bios_encoder_dp_boost_level(encoder->devdata); if (iboost == 0) { - const union intel_ddi_buf_trans_entry *ddi_translations; + const struct intel_ddi_buf_trans *ddi_translations; int n_entries; ddi_translations = hsw_get_buf_trans(encoder, crtc_state, &n_entries); @@ -918,7 +918,7 @@ static void skl_ddi_set_iboost(struct intel_encoder *encoder, if (drm_WARN_ON_ONCE(&dev_priv->drm, level >= n_entries)) level = n_entries - 1; - iboost = ddi_translations[level].hsw.i_boost; + iboost = ddi_translations->entries[level].hsw.i_boost; } /* Make sure that the requested I_boost is valid */ @@ -938,7 +938,7 @@ static void bxt_ddi_vswing_sequence(struct intel_encoder *encoder, int level) { struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); - const union intel_ddi_buf_trans_entry *ddi_translations; + const struct intel_ddi_buf_trans *ddi_translations; enum port port = encoder->port; int n_entries; @@ -949,10 +949,10 @@ static void bxt_ddi_vswing_sequence(struct intel_encoder *encoder, level = n_entries - 1; bxt_ddi_phy_set_signal_level(dev_priv, port, - ddi_translations[level].bxt.margin, - ddi_translations[level].bxt.scale, - ddi_translations[level].bxt.enable, - ddi_translations[level].bxt.deemphasis); + ddi_translations->entries[level].bxt.margin, + ddi_translations->entries[level].bxt.scale, + ddi_translations->entries[level].bxt.enable, + ddi_translations->entries[level].bxt.deemphasis); } static u8 intel_ddi_dp_voltage_max(struct intel_dp *intel_dp, @@ -1011,7 +1011,7 @@ static void cnl_ddi_vswing_program(struct intel_encoder *encoder, int level) { struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); - const union intel_ddi_buf_trans_entry *ddi_translations; + const struct intel_ddi_buf_trans *ddi_translations; enum port port = encoder->port; int n_entries, ln; u32 val; @@ -1033,8 +1033,8 @@ static void cnl_ddi_vswing_program(struct intel_encoder *encoder, val = intel_de_read(dev_priv, CNL_PORT_TX_DW2_LN0(port)); val &= ~(SWING_SEL_LOWER_MASK | SWING_SEL_UPPER_MASK | RCOMP_SCALAR_MASK); - val |= SWING_SEL_UPPER(ddi_translations[level].cnl.dw2_swing_sel); - val |= SWING_SEL_LOWER(ddi_translations[level].cnl.dw2_swing_sel); + val |= SWING_SEL_UPPER(ddi_translations->entries[level].cnl.dw2_swing_sel); + val |= SWING_SEL_LOWER(ddi_translations->entries[level].cnl.dw2_swing_sel); /* Rcomp scalar is fixed as 0x98 for every table entry */ val |= RCOMP_SCALAR(0x98); intel_de_write(dev_priv, CNL_PORT_TX_DW2_GRP(port), val); @@ -1045,9 +1045,9 @@ static void cnl_ddi_vswing_program(struct intel_encoder *encoder, val = intel_de_read(dev_priv, CNL_PORT_TX_DW4_LN(ln, port)); val &= ~(POST_CURSOR_1_MASK | POST_CURSOR_2_MASK | CURSOR_COEFF_MASK); - val |= POST_CURSOR_1(ddi_translations[level].cnl.dw4_post_cursor_1); - val |= POST_CURSOR_2(ddi_translations[level].cnl.dw4_post_cursor_2); - val |= CURSOR_COEFF(ddi_translations[level].cnl.dw4_cursor_coeff); + val |= POST_CURSOR_1(ddi_translations->entries[level].cnl.dw4_post_cursor_1); + val |= POST_CURSOR_2(ddi_translations->entries[level].cnl.dw4_post_cursor_2); + val |= CURSOR_COEFF(ddi_translations->entries[level].cnl.dw4_cursor_coeff); intel_de_write(dev_priv, CNL_PORT_TX_DW4_LN(ln, port), val); } @@ -1062,7 +1062,7 @@ static void cnl_ddi_vswing_program(struct intel_encoder *encoder, /* Program PORT_TX_DW7 */ val = intel_de_read(dev_priv, CNL_PORT_TX_DW7_LN0(port)); val &= ~N_SCALAR_MASK; - val |= N_SCALAR(ddi_translations[level].cnl.dw7_n_scalar); + val |= N_SCALAR(ddi_translations->entries[level].cnl.dw7_n_scalar); intel_de_write(dev_priv, CNL_PORT_TX_DW7_GRP(port), val); } @@ -1132,7 +1132,7 @@ static void icl_ddi_combo_vswing_program(struct intel_encoder *encoder, int level) { struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); - const union intel_ddi_buf_trans_entry *ddi_translations; + const struct intel_ddi_buf_trans *ddi_translations; enum phy phy = intel_port_to_phy(dev_priv, encoder->port); int n_entries, ln; u32 val; @@ -1173,8 +1173,8 @@ static void icl_ddi_combo_vswing_program(struct intel_encoder *encoder, val = intel_de_read(dev_priv, ICL_PORT_TX_DW2_LN0(phy)); val &= ~(SWING_SEL_LOWER_MASK | SWING_SEL_UPPER_MASK | RCOMP_SCALAR_MASK); - val |= SWING_SEL_UPPER(ddi_translations[level].cnl.dw2_swing_sel); - val |= SWING_SEL_LOWER(ddi_translations[level].cnl.dw2_swing_sel); + val |= SWING_SEL_UPPER(ddi_translations->entries[level].cnl.dw2_swing_sel); + val |= SWING_SEL_LOWER(ddi_translations->entries[level].cnl.dw2_swing_sel); /* Program Rcomp scalar for every table entry */ val |= RCOMP_SCALAR(0x98); intel_de_write(dev_priv, ICL_PORT_TX_DW2_GRP(phy), val); @@ -1185,16 +1185,16 @@ static void icl_ddi_combo_vswing_program(struct intel_encoder *encoder, val = intel_de_read(dev_priv, ICL_PORT_TX_DW4_LN(ln, phy)); val &= ~(POST_CURSOR_1_MASK | POST_CURSOR_2_MASK | CURSOR_COEFF_MASK); - val |= POST_CURSOR_1(ddi_translations[level].cnl.dw4_post_cursor_1); - val |= POST_CURSOR_2(ddi_translations[level].cnl.dw4_post_cursor_2); - val |= CURSOR_COEFF(ddi_translations[level].cnl.dw4_cursor_coeff); + val |= POST_CURSOR_1(ddi_translations->entries[level].cnl.dw4_post_cursor_1); + val |= POST_CURSOR_2(ddi_translations->entries[level].cnl.dw4_post_cursor_2); + val |= CURSOR_COEFF(ddi_translations->entries[level].cnl.dw4_cursor_coeff); intel_de_write(dev_priv, ICL_PORT_TX_DW4_LN(ln, phy), val); } /* Program PORT_TX_DW7 */ val = intel_de_read(dev_priv, ICL_PORT_TX_DW7_LN0(phy)); val &= ~N_SCALAR_MASK; - val |= N_SCALAR(ddi_translations[level].cnl.dw7_n_scalar); + val |= N_SCALAR(ddi_translations->entries[level].cnl.dw7_n_scalar); intel_de_write(dev_priv, ICL_PORT_TX_DW7_GRP(phy), val); } @@ -1265,7 +1265,7 @@ static void icl_mg_phy_ddi_vswing_sequence(struct intel_encoder *encoder, { struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); enum tc_port tc_port = intel_port_to_tc(dev_priv, encoder->port); - const union intel_ddi_buf_trans_entry *ddi_translations; + const struct intel_ddi_buf_trans *ddi_translations; int n_entries, ln; u32 val; @@ -1295,13 +1295,13 @@ static void icl_mg_phy_ddi_vswing_sequence(struct intel_encoder *encoder, val = intel_de_read(dev_priv, MG_TX1_SWINGCTRL(ln, tc_port)); val &= ~CRI_TXDEEMPH_OVERRIDE_17_12_MASK; val |= CRI_TXDEEMPH_OVERRIDE_17_12( - ddi_translations[level].mg.cri_txdeemph_override_17_12); + ddi_translations->entries[level].mg.cri_txdeemph_override_17_12); intel_de_write(dev_priv, MG_TX1_SWINGCTRL(ln, tc_port), val); val = intel_de_read(dev_priv, MG_TX2_SWINGCTRL(ln, tc_port)); val &= ~CRI_TXDEEMPH_OVERRIDE_17_12_MASK; val |= CRI_TXDEEMPH_OVERRIDE_17_12( - ddi_translations[level].mg.cri_txdeemph_override_17_12); + ddi_translations->entries[level].mg.cri_txdeemph_override_17_12); intel_de_write(dev_priv, MG_TX2_SWINGCTRL(ln, tc_port), val); } @@ -1311,9 +1311,9 @@ static void icl_mg_phy_ddi_vswing_sequence(struct intel_encoder *encoder, val &= ~(CRI_TXDEEMPH_OVERRIDE_11_6_MASK | CRI_TXDEEMPH_OVERRIDE_5_0_MASK); val |= CRI_TXDEEMPH_OVERRIDE_5_0( - ddi_translations[level].mg.cri_txdeemph_override_5_0) | + ddi_translations->entries[level].mg.cri_txdeemph_override_5_0) | CRI_TXDEEMPH_OVERRIDE_11_6( - ddi_translations[level].mg.cri_txdeemph_override_11_6) | + ddi_translations->entries[level].mg.cri_txdeemph_override_11_6) | CRI_TXDEEMPH_OVERRIDE_EN; intel_de_write(dev_priv, MG_TX1_DRVCTRL(ln, tc_port), val); @@ -1321,9 +1321,9 @@ static void icl_mg_phy_ddi_vswing_sequence(struct intel_encoder *encoder, val &= ~(CRI_TXDEEMPH_OVERRIDE_11_6_MASK | CRI_TXDEEMPH_OVERRIDE_5_0_MASK); val |= CRI_TXDEEMPH_OVERRIDE_5_0( - ddi_translations[level].mg.cri_txdeemph_override_5_0) | + ddi_translations->entries[level].mg.cri_txdeemph_override_5_0) | CRI_TXDEEMPH_OVERRIDE_11_6( - ddi_translations[level].mg.cri_txdeemph_override_11_6) | + ddi_translations->entries[level].mg.cri_txdeemph_override_11_6) | CRI_TXDEEMPH_OVERRIDE_EN; intel_de_write(dev_priv, MG_TX2_DRVCTRL(ln, tc_port), val); @@ -1403,7 +1403,7 @@ tgl_dkl_phy_ddi_vswing_sequence(struct intel_encoder *encoder, { struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); enum tc_port tc_port = intel_port_to_tc(dev_priv, encoder->port); - const union intel_ddi_buf_trans_entry *ddi_translations; + const struct intel_ddi_buf_trans *ddi_translations; u32 val, dpcnt_mask, dpcnt_val; int n_entries, ln; @@ -1420,9 +1420,9 @@ tgl_dkl_phy_ddi_vswing_sequence(struct intel_encoder *encoder, dpcnt_mask = (DKL_TX_PRESHOOT_COEFF_MASK | DKL_TX_DE_EMPAHSIS_COEFF_MASK | DKL_TX_VSWING_CONTROL_MASK); - dpcnt_val = DKL_TX_VSWING_CONTROL(ddi_translations[level].dkl.dkl_vswing_control); - dpcnt_val |= DKL_TX_DE_EMPHASIS_COEFF(ddi_translations[level].dkl.dkl_de_emphasis_control); - dpcnt_val |= DKL_TX_PRESHOOT_COEFF(ddi_translations[level].dkl.dkl_preshoot_control); + dpcnt_val = DKL_TX_VSWING_CONTROL(ddi_translations->entries[level].dkl.dkl_vswing_control); + dpcnt_val |= DKL_TX_DE_EMPHASIS_COEFF(ddi_translations->entries[level].dkl.dkl_de_emphasis_control); + dpcnt_val |= DKL_TX_PRESHOOT_COEFF(ddi_translations->entries[level].dkl.dkl_preshoot_control); for (ln = 0; ln < 2; ln++) { intel_de_write(dev_priv, HIP_INDEX_REG(tc_port), diff --git a/drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c b/drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c index 413e3c55027e..d91b946dfa66 100644 --- a/drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c +++ b/drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c @@ -988,19 +988,19 @@ static const struct intel_ddi_buf_trans rkl_combo_phy_ddi_translations_dp_hbr2_h .num_entries = ARRAY_SIZE(_rkl_combo_phy_ddi_translations_dp_hbr2_hbr3), }; -bool is_hobl_buf_trans(const union intel_ddi_buf_trans_entry *table) +bool is_hobl_buf_trans(const struct intel_ddi_buf_trans *table) { - return table == tgl_combo_phy_ddi_translations_edp_hbr2_hobl.entries; + return table == &tgl_combo_phy_ddi_translations_edp_hbr2_hobl; } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * intel_get_buf_trans(const struct intel_ddi_buf_trans *ddi_translations, int *num_entries) { *num_entries = ddi_translations->num_entries; - return ddi_translations->entries; + return ddi_translations; } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * bdw_get_buf_trans_edp(struct intel_encoder *encoder, int *n_entries) { struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); @@ -1014,7 +1014,7 @@ bdw_get_buf_trans_edp(struct intel_encoder *encoder, int *n_entries) } } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * skl_get_buf_trans_dp(struct intel_encoder *encoder, int *n_entries) { struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); @@ -1031,7 +1031,7 @@ skl_get_buf_trans_dp(struct intel_encoder *encoder, int *n_entries) } } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * kbl_get_buf_trans_dp(struct intel_encoder *encoder, int *n_entries) { struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); @@ -1052,7 +1052,7 @@ kbl_get_buf_trans_dp(struct intel_encoder *encoder, int *n_entries) } } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * skl_get_buf_trans_edp(struct intel_encoder *encoder, int *n_entries) { struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); @@ -1084,7 +1084,7 @@ skl_get_buf_trans_edp(struct intel_encoder *encoder, int *n_entries) return skl_get_buf_trans_dp(encoder, n_entries); } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * skl_get_buf_trans_hdmi(struct drm_i915_private *dev_priv, int *n_entries) { if (IS_SKL_ULX(dev_priv) || @@ -1108,7 +1108,7 @@ static int skl_buf_trans_num_entries(enum port port, int n_entries) return min(n_entries, 9); } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * hsw_get_buf_trans_dp(struct intel_encoder *encoder, int *n_entries) { struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); @@ -1116,12 +1116,12 @@ hsw_get_buf_trans_dp(struct intel_encoder *encoder, int *n_entries) if (IS_KABYLAKE(dev_priv) || IS_COFFEELAKE(dev_priv) || IS_COMETLAKE(dev_priv)) { - const union intel_ddi_buf_trans_entry *ddi_translations = + const struct intel_ddi_buf_trans *ddi_translations = kbl_get_buf_trans_dp(encoder, n_entries); *n_entries = skl_buf_trans_num_entries(encoder->port, *n_entries); return ddi_translations; } else if (IS_SKYLAKE(dev_priv)) { - const union intel_ddi_buf_trans_entry *ddi_translations = + const struct intel_ddi_buf_trans *ddi_translations = skl_get_buf_trans_dp(encoder, n_entries); *n_entries = skl_buf_trans_num_entries(encoder->port, *n_entries); return ddi_translations; @@ -1137,13 +1137,13 @@ hsw_get_buf_trans_dp(struct intel_encoder *encoder, int *n_entries) return NULL; } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * hsw_get_buf_trans_edp(struct intel_encoder *encoder, int *n_entries) { struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); if (DISPLAY_VER(dev_priv) == 9 && !IS_BROXTON(dev_priv)) { - const union intel_ddi_buf_trans_entry *ddi_translations = + const struct intel_ddi_buf_trans *ddi_translations = skl_get_buf_trans_edp(encoder, n_entries); *n_entries = skl_buf_trans_num_entries(encoder->port, *n_entries); return ddi_translations; @@ -1158,7 +1158,7 @@ hsw_get_buf_trans_edp(struct intel_encoder *encoder, int *n_entries) return NULL; } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * hsw_get_buf_trans_fdi(struct intel_encoder *encoder, int *n_entries) { @@ -1176,7 +1176,7 @@ hsw_get_buf_trans_fdi(struct intel_encoder *encoder, return NULL; } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * hsw_get_buf_trans_hdmi(struct intel_encoder *encoder, int *n_entries) { @@ -1196,7 +1196,7 @@ hsw_get_buf_trans_hdmi(struct intel_encoder *encoder, return NULL; } -const union intel_ddi_buf_trans_entry * +const struct intel_ddi_buf_trans * hsw_get_buf_trans(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1211,13 +1211,13 @@ hsw_get_buf_trans(struct intel_encoder *encoder, return hsw_get_buf_trans_dp(encoder, n_entries); } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * bxt_get_buf_trans_dp(struct intel_encoder *encoder, int *n_entries) { return intel_get_buf_trans(&bxt_ddi_translations_dp, n_entries); } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * bxt_get_buf_trans_edp(struct intel_encoder *encoder, int *n_entries) { struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); @@ -1230,13 +1230,13 @@ bxt_get_buf_trans_edp(struct intel_encoder *encoder, int *n_entries) return bxt_get_buf_trans_dp(encoder, n_entries); } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * bxt_get_buf_trans_hdmi(struct intel_encoder *encoder, int *n_entries) { return intel_get_buf_trans(&bxt_ddi_translations_hdmi, n_entries); } -const union intel_ddi_buf_trans_entry * +const struct intel_ddi_buf_trans * bxt_get_buf_trans(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1248,7 +1248,7 @@ bxt_get_buf_trans(struct intel_encoder *encoder, return bxt_get_buf_trans_dp(encoder, n_entries); } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * cnl_get_buf_trans_hdmi(struct intel_encoder *encoder, int *n_entries) { struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); @@ -1270,7 +1270,7 @@ cnl_get_buf_trans_hdmi(struct intel_encoder *encoder, int *n_entries) return NULL; } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * cnl_get_buf_trans_dp(struct intel_encoder *encoder, int *n_entries) { struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); @@ -1292,7 +1292,7 @@ cnl_get_buf_trans_dp(struct intel_encoder *encoder, int *n_entries) return NULL; } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * cnl_get_buf_trans_edp(struct intel_encoder *encoder, int *n_entries) { struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); @@ -1318,7 +1318,7 @@ cnl_get_buf_trans_edp(struct intel_encoder *encoder, int *n_entries) } } -const union intel_ddi_buf_trans_entry * +const struct intel_ddi_buf_trans * cnl_get_buf_trans(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1330,7 +1330,7 @@ cnl_get_buf_trans(struct intel_encoder *encoder, return cnl_get_buf_trans_dp(encoder, n_entries); } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * icl_get_combo_buf_trans_hdmi(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1339,7 +1339,7 @@ icl_get_combo_buf_trans_hdmi(struct intel_encoder *encoder, n_entries); } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * icl_get_combo_buf_trans_dp(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1348,7 +1348,7 @@ icl_get_combo_buf_trans_dp(struct intel_encoder *encoder, n_entries); } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * icl_get_combo_buf_trans_edp(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1372,7 +1372,7 @@ icl_get_combo_buf_trans_edp(struct intel_encoder *encoder, return icl_get_combo_buf_trans_dp(encoder, crtc_state, n_entries); } -const union intel_ddi_buf_trans_entry * +const struct intel_ddi_buf_trans * icl_get_combo_buf_trans(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1385,7 +1385,7 @@ icl_get_combo_buf_trans(struct intel_encoder *encoder, return icl_get_combo_buf_trans_dp(encoder, crtc_state, n_entries); } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * icl_get_mg_buf_trans_hdmi(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1394,7 +1394,7 @@ icl_get_mg_buf_trans_hdmi(struct intel_encoder *encoder, n_entries); } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * icl_get_mg_buf_trans_dp(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1408,7 +1408,7 @@ icl_get_mg_buf_trans_dp(struct intel_encoder *encoder, } } -const union intel_ddi_buf_trans_entry * +const struct intel_ddi_buf_trans * icl_get_mg_buf_trans(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1419,7 +1419,7 @@ icl_get_mg_buf_trans(struct intel_encoder *encoder, return icl_get_mg_buf_trans_dp(encoder, crtc_state, n_entries); } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * ehl_get_combo_buf_trans_hdmi(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1428,7 +1428,7 @@ ehl_get_combo_buf_trans_hdmi(struct intel_encoder *encoder, n_entries); } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * ehl_get_combo_buf_trans_dp(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1437,7 +1437,7 @@ ehl_get_combo_buf_trans_dp(struct intel_encoder *encoder, n_entries); } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * ehl_get_combo_buf_trans_edp(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1452,7 +1452,7 @@ ehl_get_combo_buf_trans_edp(struct intel_encoder *encoder, return ehl_get_combo_buf_trans_dp(encoder, crtc_state, n_entries); } -const union intel_ddi_buf_trans_entry * +const struct intel_ddi_buf_trans * ehl_get_combo_buf_trans(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1465,7 +1465,7 @@ ehl_get_combo_buf_trans(struct intel_encoder *encoder, return ehl_get_combo_buf_trans_dp(encoder, crtc_state, n_entries); } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * jsl_get_combo_buf_trans_hdmi(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1474,7 +1474,7 @@ jsl_get_combo_buf_trans_hdmi(struct intel_encoder *encoder, n_entries); } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * jsl_get_combo_buf_trans_dp(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1483,7 +1483,7 @@ jsl_get_combo_buf_trans_dp(struct intel_encoder *encoder, n_entries); } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * jsl_get_combo_buf_trans_edp(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1503,7 +1503,7 @@ jsl_get_combo_buf_trans_edp(struct intel_encoder *encoder, return jsl_get_combo_buf_trans_dp(encoder, crtc_state, n_entries); } -const union intel_ddi_buf_trans_entry * +const struct intel_ddi_buf_trans * jsl_get_combo_buf_trans(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1516,7 +1516,7 @@ jsl_get_combo_buf_trans(struct intel_encoder *encoder, return jsl_get_combo_buf_trans_dp(encoder, crtc_state, n_entries); } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * tgl_get_combo_buf_trans_hdmi(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1525,7 +1525,7 @@ tgl_get_combo_buf_trans_hdmi(struct intel_encoder *encoder, n_entries); } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * tgl_get_combo_buf_trans_dp(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1554,7 +1554,7 @@ tgl_get_combo_buf_trans_dp(struct intel_encoder *encoder, } } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * tgl_get_combo_buf_trans_edp(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1576,7 +1576,7 @@ tgl_get_combo_buf_trans_edp(struct intel_encoder *encoder, return tgl_get_combo_buf_trans_dp(encoder, crtc_state, n_entries); } -const union intel_ddi_buf_trans_entry * +const struct intel_ddi_buf_trans * tgl_get_combo_buf_trans(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1589,7 +1589,7 @@ tgl_get_combo_buf_trans(struct intel_encoder *encoder, return tgl_get_combo_buf_trans_dp(encoder, crtc_state, n_entries); } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * tgl_get_dkl_buf_trans_hdmi(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1598,7 +1598,7 @@ tgl_get_dkl_buf_trans_hdmi(struct intel_encoder *encoder, n_entries); } -static const union intel_ddi_buf_trans_entry * +static const struct intel_ddi_buf_trans * tgl_get_dkl_buf_trans_dp(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) @@ -1612,7 +1612,7 @@ tgl_get_dkl_buf_trans_dp(struct intel_encoder *encoder, } } -const union intel_ddi_buf_trans_entry * +const struct intel_ddi_buf_trans * tgl_get_dkl_buf_trans(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries) diff --git a/drivers/gpu/drm/i915/display/intel_ddi_buf_trans.h b/drivers/gpu/drm/i915/display/intel_ddi_buf_trans.h index 363f96709079..24072411e0b0 100644 --- a/drivers/gpu/drm/i915/display/intel_ddi_buf_trans.h +++ b/drivers/gpu/drm/i915/display/intel_ddi_buf_trans.h @@ -58,48 +58,48 @@ struct intel_ddi_buf_trans { u8 num_entries; }; -bool is_hobl_buf_trans(const union intel_ddi_buf_trans_entry *table); +bool is_hobl_buf_trans(const struct intel_ddi_buf_trans *table); int intel_ddi_hdmi_num_entries(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *default_entry); -const union intel_ddi_buf_trans_entry * +const struct intel_ddi_buf_trans * hsw_get_buf_trans(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries); -const union intel_ddi_buf_trans_entry * +const struct intel_ddi_buf_trans * bxt_get_buf_trans(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries); -const union intel_ddi_buf_trans_entry * +const struct intel_ddi_buf_trans * tgl_get_combo_buf_trans(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries); -const union intel_ddi_buf_trans_entry * +const struct intel_ddi_buf_trans * tgl_get_dkl_buf_trans(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries); -const union intel_ddi_buf_trans_entry * +const struct intel_ddi_buf_trans * jsl_get_combo_buf_trans(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries); -const union intel_ddi_buf_trans_entry * +const struct intel_ddi_buf_trans * ehl_get_combo_buf_trans(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries); -const union intel_ddi_buf_trans_entry * +const struct intel_ddi_buf_trans * icl_get_combo_buf_trans(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries); -const union intel_ddi_buf_trans_entry * +const struct intel_ddi_buf_trans * icl_get_mg_buf_trans(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries); -const union intel_ddi_buf_trans_entry * +const struct intel_ddi_buf_trans * cnl_get_buf_trans(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, int *n_entries); -- 2.26.3 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx