[Intel-gfx] [PATCH 1/8] drm/i915: refactor ddi translations into a separate file
Jani Nikula
jani.nikula at linux.intel.com
Thu Jan 21 12:01:39 UTC 2021
On Thu, 21 Jan 2021, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> Ville suggested this, these tables are probably better being
> standalone.
>
> This fixes up the cnl/bxt interfaces to be like the others,
> the intel one I left alone since it has a few extra entrypoints.
>
> Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> drivers/gpu/drm/i915/Makefile | 1 +
> drivers/gpu/drm/i915/display/intel_ddi.c | 1417 +----------------
> .../drm/i915/display/intel_ddi_buf_trans.c | 1358 ++++++++++++++++
> .../drm/i915/display/intel_ddi_buf_trans.h | 100 ++
> 4 files changed, 1471 insertions(+), 1405 deletions(-)
> create mode 100644 drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c
> create mode 100644 drivers/gpu/drm/i915/display/intel_ddi_buf_trans.h
Sorry, but the rebase fails to take into account at least the Rocket
Lake changes in tgl_get_combo_buf_trans_dp().
Also, there were a number of sparse warnings for missing static:
+drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:714:28: warning: symbol 'bdw_get_buf_trans_edp' was not declared. Should it be static?
+drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:728:28: warning: symbol 'skl_get_buf_trans_dp' was not declared. Should it be static?
+drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:745:28: warning: symbol 'kbl_get_buf_trans_dp' was not declared. Should it be static?
+drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:766:28: warning: symbol 'skl_get_buf_trans_edp' was not declared. Should it be static?
+drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:798:28: warning: symbol 'skl_get_buf_trans_hdmi' was not declared. Should it be static?
+drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c:813:5: warning: symbol 'skl_buf_trans_num_entries' was not declared. Should it be static?
BR,
Jani.
> -static const struct cnl_ddi_buf_trans *
> -tgl_get_combo_buf_trans_dp(struct intel_encoder *encoder,
> - const struct intel_crtc_state *crtc_state,
> - int *n_entries)
> -{
> - struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> -
> - if (crtc_state->port_clock > 270000) {
> - if (IS_ROCKETLAKE(dev_priv)) {
> - *n_entries = ARRAY_SIZE(rkl_combo_phy_ddi_translations_dp_hbr2_hbr3);
> - return rkl_combo_phy_ddi_translations_dp_hbr2_hbr3;
> - } else if (IS_TGL_U(dev_priv) || IS_TGL_Y(dev_priv)) {
> - *n_entries = ARRAY_SIZE(tgl_uy_combo_phy_ddi_translations_dp_hbr2);
> - return tgl_uy_combo_phy_ddi_translations_dp_hbr2;
> - } else {
> - *n_entries = ARRAY_SIZE(tgl_combo_phy_ddi_translations_dp_hbr2);
> - return tgl_combo_phy_ddi_translations_dp_hbr2;
> - }
> - } else {
> - if (IS_ROCKETLAKE(dev_priv)) {
> - *n_entries = ARRAY_SIZE(rkl_combo_phy_ddi_translations_dp_hbr);
> - return rkl_combo_phy_ddi_translations_dp_hbr;
> - } else {
> - *n_entries = ARRAY_SIZE(tgl_combo_phy_ddi_translations_dp_hbr);
> - return tgl_combo_phy_ddi_translations_dp_hbr;
> - }
> - }
> -}
> +static const struct cnl_ddi_buf_trans *
> +tgl_get_combo_buf_trans_dp(struct intel_encoder *encoder,
> + const struct intel_crtc_state *crtc_state,
> + int *n_entries)
> +{
> + struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> +
> + if (crtc_state->port_clock > 270000) {
> + if (IS_TGL_U(dev_priv) || IS_TGL_Y(dev_priv)) {
> + *n_entries = ARRAY_SIZE(tgl_uy_combo_phy_ddi_translations_dp_hbr2);
> + return tgl_uy_combo_phy_ddi_translations_dp_hbr2;
> + } else {
> + *n_entries = ARRAY_SIZE(tgl_combo_phy_ddi_translations_dp_hbr2);
> + return tgl_combo_phy_ddi_translations_dp_hbr2;
> + }
> + } else {
> + *n_entries = ARRAY_SIZE(tgl_combo_phy_ddi_translations_dp_hbr);
> + return tgl_combo_phy_ddi_translations_dp_hbr;
> + }
> +}
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list