Commit ae52dd7d authored by Jani Nikula's avatar Jani Nikula

drm/i915/display: remove intel_display_commit_duplicated_state()

This seems like an unnecessary wrapper layer. Removing it will be
helpful later.
Reviewed-by: default avatarGustavo Sousa <gustavo.sousa@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/a38f08e259221d71314ce6d764431147b0fba218.1681465222.git.jani.nikula@intel.com
parent e920aabf
...@@ -701,20 +701,6 @@ intel_plane_fence_y_offset(const struct intel_plane_state *plane_state) ...@@ -701,20 +701,6 @@ intel_plane_fence_y_offset(const struct intel_plane_state *plane_state)
return y; return y;
} }
static int
intel_display_commit_duplicated_state(struct intel_atomic_state *state,
struct drm_modeset_acquire_ctx *ctx)
{
struct drm_i915_private *i915 = to_i915(state->base.dev);
int ret;
ret = drm_atomic_helper_commit_duplicated_state(&state->base, ctx);
drm_WARN_ON(&i915->drm, ret == -EDEADLK);
return ret;
}
static int static int
__intel_display_resume(struct drm_i915_private *i915, __intel_display_resume(struct drm_i915_private *i915,
struct drm_atomic_state *state, struct drm_atomic_state *state,
...@@ -722,7 +708,7 @@ __intel_display_resume(struct drm_i915_private *i915, ...@@ -722,7 +708,7 @@ __intel_display_resume(struct drm_i915_private *i915,
{ {
struct drm_crtc_state *crtc_state; struct drm_crtc_state *crtc_state;
struct drm_crtc *crtc; struct drm_crtc *crtc;
int i; int ret, i;
intel_modeset_setup_hw_state(i915, ctx); intel_modeset_setup_hw_state(i915, ctx);
intel_vga_redisable(i915); intel_vga_redisable(i915);
...@@ -748,7 +734,11 @@ __intel_display_resume(struct drm_i915_private *i915, ...@@ -748,7 +734,11 @@ __intel_display_resume(struct drm_i915_private *i915,
if (!HAS_GMCH(i915)) if (!HAS_GMCH(i915))
to_intel_atomic_state(state)->skip_intermediate_wm = true; to_intel_atomic_state(state)->skip_intermediate_wm = true;
return intel_display_commit_duplicated_state(to_intel_atomic_state(state), ctx); ret = drm_atomic_helper_commit_duplicated_state(state, ctx);
drm_WARN_ON(&i915->drm, ret == -EDEADLK);
return ret;
} }
static bool gpu_reset_clobbers_display(struct drm_i915_private *dev_priv) static bool gpu_reset_clobbers_display(struct drm_i915_private *dev_priv)
...@@ -839,10 +829,12 @@ void intel_display_finish_reset(struct drm_i915_private *i915) ...@@ -839,10 +829,12 @@ void intel_display_finish_reset(struct drm_i915_private *i915)
/* reset doesn't touch the display */ /* reset doesn't touch the display */
if (!gpu_reset_clobbers_display(i915)) { if (!gpu_reset_clobbers_display(i915)) {
/* for testing only restore the display */ /* for testing only restore the display */
ret = intel_display_commit_duplicated_state(to_intel_atomic_state(state), ctx); ret = drm_atomic_helper_commit_duplicated_state(state, ctx);
if (ret) if (ret) {
drm_WARN_ON(&i915->drm, ret == -EDEADLK);
drm_err(&i915->drm, drm_err(&i915->drm,
"Restoring old state failed with %i\n", ret); "Restoring old state failed with %i\n", ret);
}
} else { } else {
/* /*
* The display has been reset as well, * The display has been reset as well,
......
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