drm/i915/panel: mass rename functions to have intel_panel_ prefix
authorJani Nikula <jani.nikula@intel.com>
Wed, 25 Aug 2021 11:06:52 +0000 (14:06 +0300)
committerJani Nikula <jani.nikula@intel.com>
Thu, 26 Aug 2021 07:40:41 +0000 (10:40 +0300)
Follow the usual naming conventions. Also pull HAS_GMCH() check to
intel_panel_fitting(). No functional changes.

Cc: Lyude Paul <lyude@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/9ff6e42e377bdb0c9349f50d9ea79671059633c7.1629888677.git.jani.nikula@intel.com
drivers/gpu/drm/i915/display/icl_dsi.c
drivers/gpu/drm/i915/display/intel_dp.c
drivers/gpu/drm/i915/display/intel_dvo.c
drivers/gpu/drm/i915/display/intel_hdmi.c
drivers/gpu/drm/i915/display/intel_lvds.c
drivers/gpu/drm/i915/display/intel_panel.c
drivers/gpu/drm/i915/display/intel_panel.h
drivers/gpu/drm/i915/display/vlv_dsi.c

index 6de268c..5a5e368 100644 (file)
@@ -1652,9 +1652,9 @@ static int gen11_dsi_compute_config(struct intel_encoder *encoder,
        int ret;
 
        pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB;
-       intel_fixed_panel_mode(fixed_mode, adjusted_mode);
+       intel_panel_fixed_mode(fixed_mode, adjusted_mode);
 
-       ret = intel_pch_panel_fitting(pipe_config, conn_state);
+       ret = intel_panel_fitting(pipe_config, conn_state);
        if (ret)
                return ret;
 
index d43e285..7f8e886 100644 (file)
@@ -1738,7 +1738,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
                                                            adjusted_mode);
 
        if (pipe_config->output_format == INTEL_OUTPUT_FORMAT_YCBCR420) {
-               ret = intel_pch_panel_fitting(pipe_config, conn_state);
+               ret = intel_panel_fitting(pipe_config, conn_state);
                if (ret)
                        return ret;
        }
@@ -1751,13 +1751,10 @@ intel_dp_compute_config(struct intel_encoder *encoder,
                pipe_config->has_audio = intel_conn_state->force_audio == HDMI_AUDIO_ON;
 
        if (intel_dp_is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
-               intel_fixed_panel_mode(intel_connector->panel.fixed_mode,
+               intel_panel_fixed_mode(intel_connector->panel.fixed_mode,
                                       adjusted_mode);
 
-               if (HAS_GMCH(dev_priv))
-                       ret = intel_gmch_panel_fitting(pipe_config, conn_state);
-               else
-                       ret = intel_pch_panel_fitting(pipe_config, conn_state);
+               ret = intel_panel_fitting(pipe_config, conn_state);
                if (ret)
                        return ret;
        }
index 77419f8..86c903e 100644 (file)
@@ -265,7 +265,7 @@ static int intel_dvo_compute_config(struct intel_encoder *encoder,
         * of the original mode.
         */
        if (fixed_mode)
-               intel_fixed_panel_mode(fixed_mode, adjusted_mode);
+               intel_panel_fixed_mode(fixed_mode, adjusted_mode);
 
        if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN)
                return -EINVAL;
index b04685b..1bc3376 100644 (file)
@@ -2210,7 +2210,7 @@ int intel_hdmi_compute_config(struct intel_encoder *encoder,
                return ret;
 
        if (pipe_config->output_format == INTEL_OUTPUT_FORMAT_YCBCR420) {
-               ret = intel_pch_panel_fitting(pipe_config, conn_state);
+               ret = intel_panel_fitting(pipe_config, conn_state);
                if (ret)
                        return ret;
        }
index df8238f..e9fb402 100644 (file)
@@ -442,7 +442,7 @@ static int intel_lvds_compute_config(struct intel_encoder *intel_encoder,
         * with the panel scaling set up to source from the H/VDisplay
         * of the original mode.
         */
-       intel_fixed_panel_mode(intel_connector->panel.fixed_mode,
+       intel_panel_fixed_mode(intel_connector->panel.fixed_mode,
                               adjusted_mode);
 
        if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN)
@@ -451,10 +451,7 @@ static int intel_lvds_compute_config(struct intel_encoder *intel_encoder,
        if (HAS_PCH_SPLIT(dev_priv))
                pipe_config->has_pch_encoder = true;
 
-       if (HAS_GMCH(dev_priv))
-               ret = intel_gmch_panel_fitting(pipe_config, conn_state);
-       else
-               ret = intel_pch_panel_fitting(pipe_config, conn_state);
+       ret = intel_panel_fitting(pipe_config, conn_state);
        if (ret)
                return ret;
 
index fb5684d..4804b6b 100644 (file)
@@ -45,9 +45,8 @@ bool intel_panel_use_ssc(struct drm_i915_private *i915)
                && !(i915->quirks & QUIRK_LVDS_SSC_DISABLE);
 }
 
-void
-intel_fixed_panel_mode(const struct drm_display_mode *fixed_mode,
-                      struct drm_display_mode *adjusted_mode)
+void intel_panel_fixed_mode(const struct drm_display_mode *fixed_mode,
+                           struct drm_display_mode *adjusted_mode)
 {
        drm_mode_copy(adjusted_mode, fixed_mode);
 
@@ -179,8 +178,8 @@ intel_panel_vbt_fixed_mode(struct intel_connector *connector)
 }
 
 /* adjusted_mode has been preset to be the panel's fixed mode */
-int intel_pch_panel_fitting(struct intel_crtc_state *crtc_state,
-                           const struct drm_connector_state *conn_state)
+static int pch_panel_fitting(struct intel_crtc_state *crtc_state,
+                            const struct drm_connector_state *conn_state)
 {
        const struct drm_display_mode *adjusted_mode =
                &crtc_state->hw.adjusted_mode;
@@ -385,8 +384,8 @@ static void i9xx_scale_aspect(struct intel_crtc_state *crtc_state,
        }
 }
 
-int intel_gmch_panel_fitting(struct intel_crtc_state *crtc_state,
-                            const struct drm_connector_state *conn_state)
+static int gmch_panel_fitting(struct intel_crtc_state *crtc_state,
+                             const struct drm_connector_state *conn_state)
 {
        struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
        struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
@@ -460,6 +459,18 @@ out:
        return 0;
 }
 
+int intel_panel_fitting(struct intel_crtc_state *crtc_state,
+                       const struct drm_connector_state *conn_state)
+{
+       struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
+       struct drm_i915_private *i915 = to_i915(crtc->base.dev);
+
+       if (HAS_GMCH(i915))
+               return gmch_panel_fitting(crtc_state, conn_state);
+       else
+               return pch_panel_fitting(crtc_state, conn_state);
+}
+
 enum drm_connector_status
 intel_panel_detect(struct drm_connector *connector, bool force)
 {
index 19ffa61..f6af1a9 100644 (file)
@@ -24,12 +24,10 @@ void intel_panel_fini(struct intel_panel *panel);
 enum drm_connector_status
 intel_panel_detect(struct drm_connector *connector, bool force);
 bool intel_panel_use_ssc(struct drm_i915_private *i915);
-void intel_fixed_panel_mode(const struct drm_display_mode *fixed_mode,
+void intel_panel_fixed_mode(const struct drm_display_mode *fixed_mode,
                            struct drm_display_mode *adjusted_mode);
-int intel_pch_panel_fitting(struct intel_crtc_state *crtc_state,
-                           const struct drm_connector_state *conn_state);
-int intel_gmch_panel_fitting(struct intel_crtc_state *crtc_state,
-                            const struct drm_connector_state *conn_state);
+int intel_panel_fitting(struct intel_crtc_state *crtc_state,
+                       const struct drm_connector_state *conn_state);
 struct drm_display_mode *
 intel_panel_edid_downclock_mode(struct intel_connector *connector,
                                const struct drm_display_mode *fixed_mode);
index 76910c4..b0a2b6b 100644 (file)
@@ -279,12 +279,9 @@ static int intel_dsi_compute_config(struct intel_encoder *encoder,
        pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB;
 
        if (fixed_mode) {
-               intel_fixed_panel_mode(fixed_mode, adjusted_mode);
+               intel_panel_fixed_mode(fixed_mode, adjusted_mode);
 
-               if (HAS_GMCH(dev_priv))
-                       ret = intel_gmch_panel_fitting(pipe_config, conn_state);
-               else
-                       ret = intel_pch_panel_fitting(pipe_config, conn_state);
+               ret = intel_panel_fitting(pipe_config, conn_state);
                if (ret)
                        return ret;
        }