Commit 5f342993 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Move intel_atomic_state_free() into intel_atomic.c

Move intel_atomic_state_free() next to its counterpart.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200120174728.21095-13-ville.syrjala@linux.intel.comReviewed-by: default avatarImre Deak <imre.deak@intel.com>
parent ed645eee
...@@ -497,6 +497,17 @@ intel_atomic_state_alloc(struct drm_device *dev) ...@@ -497,6 +497,17 @@ intel_atomic_state_alloc(struct drm_device *dev)
return &state->base; return &state->base;
} }
void intel_atomic_state_free(struct drm_atomic_state *_state)
{
struct intel_atomic_state *state = to_intel_atomic_state(_state);
drm_atomic_state_default_release(&state->base);
i915_sw_fence_fini(&state->commit_ready);
kfree(state);
}
void intel_atomic_state_clear(struct drm_atomic_state *s) void intel_atomic_state_clear(struct drm_atomic_state *s)
{ {
struct intel_atomic_state *state = to_intel_atomic_state(s); struct intel_atomic_state *state = to_intel_atomic_state(s);
......
...@@ -45,6 +45,7 @@ void intel_crtc_destroy_state(struct drm_crtc *crtc, ...@@ -45,6 +45,7 @@ void intel_crtc_destroy_state(struct drm_crtc *crtc,
void intel_crtc_free_hw_state(struct intel_crtc_state *crtc_state); void intel_crtc_free_hw_state(struct intel_crtc_state *crtc_state);
void intel_crtc_copy_color_blobs(struct intel_crtc_state *crtc_state); void intel_crtc_copy_color_blobs(struct intel_crtc_state *crtc_state);
struct drm_atomic_state *intel_atomic_state_alloc(struct drm_device *dev); struct drm_atomic_state *intel_atomic_state_alloc(struct drm_device *dev);
void intel_atomic_state_free(struct drm_atomic_state *state);
void intel_atomic_state_clear(struct drm_atomic_state *state); void intel_atomic_state_clear(struct drm_atomic_state *state);
struct intel_crtc_state * struct intel_crtc_state *
......
...@@ -17333,17 +17333,6 @@ intel_user_framebuffer_create(struct drm_device *dev, ...@@ -17333,17 +17333,6 @@ intel_user_framebuffer_create(struct drm_device *dev,
return fb; return fb;
} }
static void intel_atomic_state_free(struct drm_atomic_state *state)
{
struct intel_atomic_state *intel_state = to_intel_atomic_state(state);
drm_atomic_state_default_release(state);
i915_sw_fence_fini(&intel_state->commit_ready);
kfree(state);
}
static enum drm_mode_status static enum drm_mode_status
intel_mode_valid(struct drm_device *dev, intel_mode_valid(struct drm_device *dev,
const struct drm_display_mode *mode) const struct drm_display_mode *mode)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment