mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 03:53:37 +02:00
drm/i915: Introduce intel_crtc_enable_changed() and intel_any_crtc_enable_changed()
Introduce helpers that determine whether any crtc is changing its enabled 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-2-ville.syrjala@linux.intel.com Reviewed-by: Mika Kahola <mika.kahola@intel.com>
This commit is contained in:
parent
324ccdb5ce
commit
b8459c3b6e
|
|
@ -753,3 +753,24 @@ void intel_pipe_update_end(struct intel_atomic_state *state,
|
|||
out:
|
||||
intel_psr_unlock(new_crtc_state);
|
||||
}
|
||||
|
||||
bool intel_crtc_enable_changed(const struct intel_crtc_state *old_crtc_state,
|
||||
const struct intel_crtc_state *new_crtc_state)
|
||||
{
|
||||
return old_crtc_state->hw.enable != new_crtc_state->hw.enable;
|
||||
}
|
||||
|
||||
bool intel_any_crtc_enable_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_enable_changed(old_crtc_state, new_crtc_state))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,4 +58,8 @@ void intel_wait_for_vblank_if_active(struct intel_display *display,
|
|||
enum pipe pipe);
|
||||
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);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user