]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/plane: add intel_plane_helper_add() helper
authorJani Nikula <jani.nikula@intel.com>
Tue, 18 May 2021 13:24:26 +0000 (16:24 +0300)
committerJani Nikula <jani.nikula@intel.com>
Thu, 8 Jul 2021 11:05:15 +0000 (14:05 +0300)
Add a small helper to keep intel_plane_helper_funcs static.

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

index 9643c45a220965abee08f82e11b5461e8a3f8096..b1439ba78f67be90d249eccb4ba0d931f9bef6ea 100644 (file)
@@ -912,7 +912,7 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe)
        zpos = 0;
        drm_plane_create_zpos_immutable_property(&plane->base, zpos);
 
-       drm_plane_helper_add(&plane->base, &intel_plane_helper_funcs);
+       intel_plane_helper_add(plane);
 
        return plane;
 
index 36f52a1d7552f90dd5d87599b83fec36def7af1f..47234d8985490dc82bbb637cbd7aa553d6f54b07 100644 (file)
@@ -601,7 +601,12 @@ int intel_atomic_plane_check_clipping(struct intel_plane_state *plane_state,
        return 0;
 }
 
-const struct drm_plane_helper_funcs intel_plane_helper_funcs = {
+static const struct drm_plane_helper_funcs intel_plane_helper_funcs = {
        .prepare_fb = intel_prepare_plane_fb,
        .cleanup_fb = intel_cleanup_plane_fb,
 };
+
+void intel_plane_helper_add(struct intel_plane *plane)
+{
+       drm_plane_helper_add(&plane->base, &intel_plane_helper_funcs);
+}
index dc4d05e75e1cb1a508e658b5b57ace6a18fd2a93..62e5a2a77fd40479b2516cc10043b708e1f0ea5e 100644 (file)
@@ -17,8 +17,6 @@ struct intel_crtc_state;
 struct intel_plane;
 struct intel_plane_state;
 
-extern const struct drm_plane_helper_funcs intel_plane_helper_funcs;
-
 unsigned int intel_adjusted_rate(const struct drm_rect *src,
                                 const struct drm_rect *dst,
                                 unsigned int rate);
@@ -65,5 +63,6 @@ int intel_atomic_plane_check_clipping(struct intel_plane_state *plane_state,
                                      bool can_position);
 void intel_plane_set_invisible(struct intel_crtc_state *crtc_state,
                               struct intel_plane_state *plane_state);
+void intel_plane_helper_add(struct intel_plane *plane);
 
 #endif /* __INTEL_ATOMIC_PLANE_H__ */
index 966e020331fbc5a621d019ab8c7ae670d39572b3..bb61e736de911946f5891eaf17d0f1263ab5afff 100644 (file)
@@ -801,7 +801,7 @@ intel_cursor_plane_create(struct drm_i915_private *dev_priv,
        if (DISPLAY_VER(dev_priv) >= 12)
                drm_plane_enable_fb_damage_clips(&cursor->base);
 
-       drm_plane_helper_add(&cursor->base, &intel_plane_helper_funcs);
+       intel_plane_helper_add(cursor);
 
        return cursor;
 
index 4ae9a7455b2328eedcdce608ac11602439cb8701..08116f41da26a944eb44ae39167a664d1d4bb5eb 100644 (file)
@@ -1856,7 +1856,7 @@ intel_sprite_plane_create(struct drm_i915_private *dev_priv,
        zpos = sprite + 1;
        drm_plane_create_zpos_immutable_property(&plane->base, zpos);
 
-       drm_plane_helper_add(&plane->base, &intel_plane_helper_funcs);
+       intel_plane_helper_add(plane);
 
        return plane;
 
index 92a4fd508e92638eadf33cd791821b89af3ef4aa..c7263f4ff11d7ce121245b0b572cb1b2308845aa 100644 (file)
@@ -2179,7 +2179,7 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,
                                                BIT(DRM_SCALING_FILTER_DEFAULT) |
                                                BIT(DRM_SCALING_FILTER_NEAREST_NEIGHBOR));
 
-       drm_plane_helper_add(&plane->base, &intel_plane_helper_funcs);
+       intel_plane_helper_add(plane);
 
        return plane;