drm/i915: Move intel_plane_destroy() into intel_atomic_plane.c
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 13 Feb 2025 15:02:14 +0000 (17:02 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Sat, 15 Feb 2025 19:04:06 +0000 (21:04 +0200)
intel_atomic_plane.c (should rename it really) has become our
standard place for generic plane code. Move intel_plane_destroy()
there so it doesn't clutter intel_display.c.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250213150220.13580-7-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@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
drivers/gpu/drm/i915/display/intel_display.h

index f58169763835b71c900cd3436a610d76d90834c8..aecff35d0ce22f47c959495e6125c94aa150b8f2 100644 (file)
@@ -93,6 +93,19 @@ void intel_plane_free(struct intel_plane *plane)
        kfree(plane);
 }
 
+/**
+ * intel_plane_destroy - destroy a plane
+ * @plane: plane to destroy
+ *
+ * Common destruction function for all types of planes (primary, cursor,
+ * sprite).
+ */
+void intel_plane_destroy(struct drm_plane *plane)
+{
+       drm_plane_cleanup(plane);
+       kfree(to_intel_plane(plane));
+}
+
 /**
  * intel_plane_duplicate_state - duplicate plane state
  * @plane: drm plane
index 9dc0b8468c2e725a4ab309f08c54cc972c26db3c..d21eb7699dbdc60022b3d78d0217144bb039c4a9 100644 (file)
@@ -52,6 +52,7 @@ void intel_plane_disable_arm(struct intel_dsb *dsb,
                             const struct intel_crtc_state *crtc_state);
 struct intel_plane *intel_plane_alloc(void);
 void intel_plane_free(struct intel_plane *plane);
+void intel_plane_destroy(struct drm_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);
index 2784cdcb9841795ab6ee858ada630db6f3319ece..80d375ed7d1892f3905c5d3488868f98c564d33f 100644 (file)
@@ -7874,19 +7874,6 @@ int intel_atomic_commit(struct drm_device *dev, struct drm_atomic_state *_state,
        return 0;
 }
 
-/**
- * intel_plane_destroy - destroy a plane
- * @plane: plane to destroy
- *
- * Common destruction function for all types of planes (primary, cursor,
- * sprite).
- */
-void intel_plane_destroy(struct drm_plane *plane)
-{
-       drm_plane_cleanup(plane);
-       kfree(to_intel_plane(plane));
-}
-
 static u32 intel_encoder_possible_clones(struct intel_encoder *encoder)
 {
        struct drm_device *dev = encoder->base.dev;
index b18363c1d47218ae9b2e25365f1c9dfaa8ee5cc6..1b3c8f834a8e89a8c5b0f441a4281e3956ad5b05 100644 (file)
@@ -448,7 +448,6 @@ bool intel_pipe_config_compare(const struct intel_crtc_state *current_config,
                               const struct intel_crtc_state *pipe_config,
                               bool fastset);
 
-void intel_plane_destroy(struct drm_plane *plane);
 void i9xx_set_pipeconf(const struct intel_crtc_state *crtc_state);
 void ilk_set_pipeconf(const struct intel_crtc_state *crtc_state);
 void intel_enable_transcoder(const struct intel_crtc_state *new_crtc_state);