Commit 663cb3e9 authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

drm/i915: Introduce intel_crtc_active_changed() and intel_any_crtc_active_changed()



Introduce helpers that determine whether any crtc is changing
its active state. Will be useful for cdclk stuff.

Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250923171943.7319-3-ville.syrjala@linux.intel.com


Reviewed-by: default avatarMika Kahola <mika.kahola@intel.com>
parent b8459c3b
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -774,3 +774,24 @@ bool intel_any_crtc_enable_changed(struct intel_atomic_state *state)

	return false;
}

bool intel_crtc_active_changed(const struct intel_crtc_state *old_crtc_state,
			       const struct intel_crtc_state *new_crtc_state)
{
	return old_crtc_state->hw.active != new_crtc_state->hw.active;
}

bool intel_any_crtc_active_changed(struct intel_atomic_state *state)
{
	const struct intel_crtc_state *old_crtc_state, *new_crtc_state;
	struct intel_crtc *crtc;
	int i;

	for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state,
					    new_crtc_state, i) {
		if (intel_crtc_active_changed(old_crtc_state, new_crtc_state))
			return true;
	}

	return false;
}
+3 −0
Original line number Diff line number Diff line
@@ -61,5 +61,8 @@ void intel_crtc_wait_for_next_vblank(struct intel_crtc *crtc);
bool intel_any_crtc_enable_changed(struct intel_atomic_state *state);
bool intel_crtc_enable_changed(const struct intel_crtc_state *old_crtc_state,
			       const struct intel_crtc_state *new_crtc_state);
bool intel_any_crtc_active_changed(struct intel_atomic_state *state);
bool intel_crtc_active_changed(const struct intel_crtc_state *old_crtc_state,
			       const struct intel_crtc_state *new_crtc_state);

#endif