]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Nuke buf_trans hdmi functions
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 8 Jun 2021 07:36:02 +0000 (10:36 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 24 Jun 2021 18:37:07 +0000 (21:37 +0300)
All the foo_get_buf_trans_hdmi() functions just return a single table.
Remove the pointless wrappers.

v2: Handle adl-p

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210608073603.2408-17-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c

index 2bd51ce4aa2c48847605347c1a5b349366797eda..a456823df102dd68e07a514bc27496e8bdf40220 100644 (file)
@@ -1294,15 +1294,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,
@@ -1336,22 +1327,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,
@@ -1372,12 +1354,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,
@@ -1432,15 +1413,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,
@@ -1490,7 +1462,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
@@ -1537,7 +1509,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
@@ -1583,22 +1555,13 @@ rkl_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 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,
@@ -1619,7 +1582,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);
 }
@@ -1644,7 +1607,7 @@ adlp_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 adlp_get_dkl_buf_trans_dp(encoder, crtc_state, n_entries);
 }