Skip to content

Commit 7105bf9

Browse files
committed
drm/i915: Move intel_plane_destroy() into intel_atomic_plane.c
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>
1 parent 13a8aca commit 7105bf9

4 files changed

Lines changed: 14 additions & 14 deletions

File tree

drivers/gpu/drm/i915/display/intel_atomic_plane.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,19 @@ void intel_plane_free(struct intel_plane *plane)
9393
kfree(plane);
9494
}
9595

96+
/**
97+
* intel_plane_destroy - destroy a plane
98+
* @plane: plane to destroy
99+
*
100+
* Common destruction function for all types of planes (primary, cursor,
101+
* sprite).
102+
*/
103+
void intel_plane_destroy(struct drm_plane *plane)
104+
{
105+
drm_plane_cleanup(plane);
106+
kfree(to_intel_plane(plane));
107+
}
108+
96109
/**
97110
* intel_plane_duplicate_state - duplicate plane state
98111
* @plane: drm plane

drivers/gpu/drm/i915/display/intel_atomic_plane.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ void intel_plane_disable_arm(struct intel_dsb *dsb,
5252
const struct intel_crtc_state *crtc_state);
5353
struct intel_plane *intel_plane_alloc(void);
5454
void intel_plane_free(struct intel_plane *plane);
55+
void intel_plane_destroy(struct drm_plane *plane);
5556
struct drm_plane_state *intel_plane_duplicate_state(struct drm_plane *plane);
5657
void intel_plane_destroy_state(struct drm_plane *plane,
5758
struct drm_plane_state *state);

drivers/gpu/drm/i915/display/intel_display.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7874,19 +7874,6 @@ int intel_atomic_commit(struct drm_device *dev, struct drm_atomic_state *_state,
78747874
return 0;
78757875
}
78767876

7877-
/**
7878-
* intel_plane_destroy - destroy a plane
7879-
* @plane: plane to destroy
7880-
*
7881-
* Common destruction function for all types of planes (primary, cursor,
7882-
* sprite).
7883-
*/
7884-
void intel_plane_destroy(struct drm_plane *plane)
7885-
{
7886-
drm_plane_cleanup(plane);
7887-
kfree(to_intel_plane(plane));
7888-
}
7889-
78907877
static u32 intel_encoder_possible_clones(struct intel_encoder *encoder)
78917878
{
78927879
struct drm_device *dev = encoder->base.dev;

drivers/gpu/drm/i915/display/intel_display.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,6 @@ bool intel_pipe_config_compare(const struct intel_crtc_state *current_config,
448448
const struct intel_crtc_state *pipe_config,
449449
bool fastset);
450450

451-
void intel_plane_destroy(struct drm_plane *plane);
452451
void i9xx_set_pipeconf(const struct intel_crtc_state *crtc_state);
453452
void ilk_set_pipeconf(const struct intel_crtc_state *crtc_state);
454453
void intel_enable_transcoder(const struct intel_crtc_state *new_crtc_state);

0 commit comments

Comments
 (0)