Skip to content

Commit

Permalink
drm/i915: Nuke buf_trans hdmi functions
Browse files Browse the repository at this point in the history
All the foo_get_buf_trans_hdmi() functions just reuturn a single table.
Remove the pointless wrappers.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
  • Loading branch information
vsyrjala authored and intel-lab-lkp committed Apr 21, 2021
1 parent 58af8cd commit 4d1671d
Showing 1 changed file with 6 additions and 43 deletions.
49 changes: 6 additions & 43 deletions drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c
Original file line number Diff line number Diff line change
Expand Up @@ -1255,15 +1255,6 @@ cnl_get_buf_trans(struct intel_encoder *encoder,
return cnl_get_buf_trans_dp(encoder, n_entries);
}

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)
{
return intel_get_buf_trans(&icl_combo_phy_ddi_translations_hdmi,
n_entries);
}

static const struct intel_ddi_buf_trans *
icl_get_combo_buf_trans_dp(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
Expand Down Expand Up @@ -1297,22 +1288,13 @@ icl_get_combo_buf_trans(struct intel_encoder *encoder,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return icl_get_combo_buf_trans_hdmi(encoder, crtc_state, n_entries);
return intel_get_buf_trans(&icl_combo_phy_ddi_translations_hdmi, n_entries);
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP))
return icl_get_combo_buf_trans_edp(encoder, crtc_state, n_entries);
else
return icl_get_combo_buf_trans_dp(encoder, crtc_state, n_entries);
}

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)
{
return intel_get_buf_trans(&icl_mg_phy_ddi_translations_hdmi,
n_entries);
}

static const struct intel_ddi_buf_trans *
icl_get_mg_buf_trans_dp(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
Expand All @@ -1333,12 +1315,11 @@ icl_get_mg_buf_trans(struct intel_encoder *encoder,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return icl_get_mg_buf_trans_hdmi(encoder, crtc_state, n_entries);
return intel_get_buf_trans(&icl_mg_phy_ddi_translations_hdmi, n_entries);
else
return icl_get_mg_buf_trans_dp(encoder, crtc_state, n_entries);
}


static const struct intel_ddi_buf_trans *
ehl_get_combo_buf_trans_edp(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
Expand Down Expand Up @@ -1393,15 +1374,6 @@ jsl_get_combo_buf_trans(struct intel_encoder *encoder,
return intel_get_buf_trans(&icl_combo_phy_ddi_translations_dp_hbr2_edp_hbr3, n_entries);
}

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)
{
return intel_get_buf_trans(&icl_combo_phy_ddi_translations_hdmi,
n_entries);
}

static const struct intel_ddi_buf_trans *
tgl_get_combo_buf_trans_dp(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
Expand Down Expand Up @@ -1451,7 +1423,7 @@ tgl_get_combo_buf_trans(struct intel_encoder *encoder,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return tgl_get_combo_buf_trans_hdmi(encoder, crtc_state, n_entries);
return intel_get_buf_trans(&icl_combo_phy_ddi_translations_hdmi, n_entries);
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP))
return tgl_get_combo_buf_trans_edp(encoder, crtc_state, n_entries);
else
Expand Down Expand Up @@ -1494,7 +1466,7 @@ dg1_get_combo_buf_trans(struct intel_encoder *encoder,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return icl_get_combo_buf_trans_hdmi(encoder, crtc_state, n_entries);
return intel_get_buf_trans(&icl_combo_phy_ddi_translations_hdmi, n_entries);
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP))
return dg1_get_combo_buf_trans_edp(encoder, crtc_state, n_entries);
else
Expand Down Expand Up @@ -1541,22 +1513,13 @@ rkl_get_combo_buf_trans(struct intel_encoder *encoder,
{
/* FIXME unclear what values we should use for HDMI and eDP */
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return tgl_get_combo_buf_trans_hdmi(encoder, crtc_state, n_entries);
return intel_get_buf_trans(&icl_combo_phy_ddi_translations_hdmi, n_entries);
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP))
return rkl_get_combo_buf_trans_edp(encoder, crtc_state, n_entries);
else
return rkl_get_combo_buf_trans_dp(encoder, crtc_state, n_entries);
}

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)
{
return intel_get_buf_trans(&tgl_dkl_phy_ddi_translations_hdmi,
n_entries);
}

static const struct intel_ddi_buf_trans *
tgl_get_dkl_buf_trans_dp(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
Expand All @@ -1577,7 +1540,7 @@ tgl_get_dkl_buf_trans(struct intel_encoder *encoder,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return tgl_get_dkl_buf_trans_hdmi(encoder, crtc_state, n_entries);
return intel_get_buf_trans(&tgl_dkl_phy_ddi_translations_hdmi, n_entries);
else
return tgl_get_dkl_buf_trans_dp(encoder, crtc_state, n_entries);
}
Expand Down

0 comments on commit 4d1671d

Please sign in to comment.