mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250923171943.7319-3-ville.syrjala@linux.intel.com Reviewed-by: Mika Kahola <mika.kahola@intel.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user