Commit 325257f2 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Hide the intel_crtc_needs_color_update() inside intel_color_check()

Move the intel_crtc_needs_color_update() into intel_color_check()
so that the caller doesn't have to care about this. This will
also enable us to hide the c8_planes_changed() thing better.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240523182818.15382-3-ville.syrjala@linux.intel.comReviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 5f128aa1
......@@ -1986,6 +1986,11 @@ int intel_color_check(struct intel_atomic_state *state,
struct intel_crtc *crtc)
{
struct drm_i915_private *i915 = to_i915(state->base.dev);
const struct intel_crtc_state *new_crtc_state =
intel_atomic_get_new_crtc_state(state, crtc);
if (!intel_crtc_needs_color_update(new_crtc_state))
return 0;
return i915->display.funcs.color->color_check(state, crtc);
}
......
......@@ -4254,11 +4254,9 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state,
if (c8_planes_changed(crtc_state))
crtc_state->uapi.color_mgmt_changed = true;
if (intel_crtc_needs_color_update(crtc_state)) {
ret = intel_color_check(state, crtc);
if (ret)
return ret;
}
ret = intel_color_check(state, crtc);
if (ret)
return ret;
ret = intel_compute_pipe_wm(state, crtc);
if (ret) {
......
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