]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915: Introduce intel_crtc_planes_update_arm()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 16 Feb 2022 23:28:04 +0000 (01:28 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 18 Feb 2022 06:42:28 +0000 (08:42 +0200)
No reason the high level intel_update_crtc() needs to know
that there is something magical about the commit order of
planes between different platforms. So let's hide that
detail even better.

In order to keep to somewhat consistent naming between
things we shall call this intel_crtc_planes_update_arm()
to match the plane->update_arm() vfunc naming convention.
And let's rename the noarm counterpart to
intel_crtc_planes_update_noarm() to more clearly associate
it with the plane->update_noarm() vfunc.

v2: Change the naming convention a bit

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

index e9893e31403774d537dc7906ded19001dda87663..c53aa6a4c7a0aacb72f8f841654db35b7c1c2d63 100644 (file)
@@ -693,8 +693,8 @@ void intel_plane_disable_arm(struct intel_plane *plane,
        plane->disable_arm(plane, crtc_state);
 }
 
-void intel_update_planes_on_crtc(struct intel_atomic_state *state,
-                                struct intel_crtc *crtc)
+void intel_crtc_planes_update_noarm(struct intel_atomic_state *state,
+                                   struct intel_crtc *crtc)
 {
        struct intel_crtc_state *new_crtc_state =
                intel_atomic_get_new_crtc_state(state, crtc);
@@ -722,8 +722,8 @@ void intel_update_planes_on_crtc(struct intel_atomic_state *state,
        }
 }
 
-void skl_arm_planes_on_crtc(struct intel_atomic_state *state,
-                           struct intel_crtc *crtc)
+static void skl_crtc_planes_update_arm(struct intel_atomic_state *state,
+                                      struct intel_crtc *crtc)
 {
        struct intel_crtc_state *old_crtc_state =
                intel_atomic_get_old_crtc_state(state, crtc);
@@ -757,8 +757,8 @@ void skl_arm_planes_on_crtc(struct intel_atomic_state *state,
        }
 }
 
-void i9xx_arm_planes_on_crtc(struct intel_atomic_state *state,
-                            struct intel_crtc *crtc)
+static void i9xx_crtc_planes_update_arm(struct intel_atomic_state *state,
+                                       struct intel_crtc *crtc)
 {
        struct intel_crtc_state *new_crtc_state =
                intel_atomic_get_new_crtc_state(state, crtc);
@@ -783,6 +783,17 @@ void i9xx_arm_planes_on_crtc(struct intel_atomic_state *state,
        }
 }
 
+void intel_crtc_planes_update_arm(struct intel_atomic_state *state,
+                                 struct intel_crtc *crtc)
+{
+       struct drm_i915_private *i915 = to_i915(state->base.dev);
+
+       if (DISPLAY_VER(i915) >= 9)
+               skl_crtc_planes_update_arm(state, crtc);
+       else
+               i9xx_crtc_planes_update_arm(state, crtc);
+}
+
 int intel_atomic_plane_check_clipping(struct intel_plane_state *plane_state,
                                      struct intel_crtc_state *crtc_state,
                                      int min_scale, int max_scale,
index 9822b921279c3f96ecc5e3c3daaed16fb746c417..f4763a53541e2371c3d4791f2a93577747e6e659 100644 (file)
@@ -44,12 +44,10 @@ void intel_plane_free(struct intel_plane *plane);
 struct drm_plane_state *intel_plane_duplicate_state(struct drm_plane *plane);
 void intel_plane_destroy_state(struct drm_plane *plane,
                               struct drm_plane_state *state);
-void intel_update_planes_on_crtc(struct intel_atomic_state *state,
-                                struct intel_crtc *crtc);
-void skl_arm_planes_on_crtc(struct intel_atomic_state *state,
-                           struct intel_crtc *crtc);
-void i9xx_arm_planes_on_crtc(struct intel_atomic_state *state,
-                            struct intel_crtc *crtc);
+void intel_crtc_planes_update_noarm(struct intel_atomic_state *state,
+                                   struct intel_crtc *crtc);
+void intel_crtc_planes_update_arm(struct intel_atomic_state *state,
+                                 struct intel_crtc *crtc);
 int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_state,
                                        struct intel_crtc_state *crtc_state,
                                        const struct intel_plane_state *old_plane_state,
index a6ebca9c7f76628b4618f218f6570d6ca816d3f9..7f95f778fd7fa910574c68f159829425d53f0538 100644 (file)
@@ -7954,7 +7954,6 @@ static void intel_enable_crtc(struct intel_atomic_state *state,
 static void intel_update_crtc(struct intel_atomic_state *state,
                              struct intel_crtc *crtc)
 {
-       struct drm_i915_private *dev_priv = to_i915(state->base.dev);
        const struct intel_crtc_state *old_crtc_state =
                intel_atomic_get_old_crtc_state(state, crtc);
        struct intel_crtc_state *new_crtc_state =
@@ -7975,17 +7974,14 @@ static void intel_update_crtc(struct intel_atomic_state *state,
 
        intel_fbc_update(state, crtc);
 
-       intel_update_planes_on_crtc(state, crtc);
+       intel_crtc_planes_update_noarm(state, crtc);
 
        /* Perform vblank evasion around commit operation */
        intel_pipe_update_start(new_crtc_state);
 
        commit_pipe_pre_planes(state, crtc);
 
-       if (DISPLAY_VER(dev_priv) >= 9)
-               skl_arm_planes_on_crtc(state, crtc);
-       else
-               i9xx_arm_planes_on_crtc(state, crtc);
+       intel_crtc_planes_update_arm(state, crtc);
 
        commit_pipe_post_planes(state, crtc);