drm/i915: Add a wrapper function around get_pipe_config
authorManasi Navare <manasi.d.navare@intel.com>
Thu, 12 Nov 2020 19:17:14 +0000 (21:17 +0200)
committerManasi Navare <manasi.d.navare@intel.com>
Fri, 13 Nov 2020 15:35:06 +0000 (07:35 -0800)
Create a new function intel_crtc_get_pipe_config()
that calls platform specific hooks for get_pipe_config()
No functional change here.

Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
[vsyrjala: Conform to modern i915 coding style, fix patch subject]
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201112191718.16683-3-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_display.c

index 110d08f2a5c57a1d87cd2bd60c466bdd5cc4bed5..a8287414937ca306d2d6397cce8c587960693a33 100644 (file)
@@ -11407,6 +11407,14 @@ out:
        return active;
 }
 
+static bool intel_crtc_get_pipe_config(struct intel_crtc_state *crtc_state)
+{
+       struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
+       struct drm_i915_private *i915 = to_i915(crtc->base.dev);
+
+       return i915->display.get_pipe_config(crtc, crtc_state);
+}
+
 static u32 intel_cursor_base(const struct intel_plane_state *plane_state)
 {
        struct drm_i915_private *dev_priv =
@@ -12403,7 +12411,7 @@ intel_encoder_current_mode(struct intel_encoder *encoder)
                return NULL;
        }
 
-       if (!dev_priv->display.get_pipe_config(crtc, crtc_state)) {
+       if (!intel_crtc_get_pipe_config(crtc_state)) {
                kfree(crtc_state);
                kfree(mode);
                return NULL;
@@ -14422,8 +14430,7 @@ verify_crtc_state(struct intel_crtc *crtc,
 
        pipe_config->hw.enable = new_crtc_state->hw.enable;
 
-       pipe_config->hw.active =
-               dev_priv->display.get_pipe_config(crtc, pipe_config);
+       pipe_config->hw.active = intel_crtc_get_pipe_config(pipe_config);
 
        /* we keep both pipes enabled on 830 */
        if (IS_I830(dev_priv) && pipe_config->hw.active)
@@ -18736,7 +18743,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
                intel_crtc_state_reset(crtc_state, crtc);
 
                crtc_state->hw.active = crtc_state->hw.enable =
-                       dev_priv->display.get_pipe_config(crtc, crtc_state);
+                       intel_crtc_get_pipe_config(crtc_state);
 
                crtc->base.enabled = crtc_state->hw.enable;
                crtc->active = crtc_state->hw.active;