Add intel_modeset_pipes_in_mask() to modeset a provided set of pipes, used in a follow-up patch. Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx> --- drivers/gpu/drm/i915/display/intel_display.c | 12 +++++++++--- drivers/gpu/drm/i915/display/intel_display.h | 2 ++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 763ab569d8f32..c35e5d7e45a3b 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -5420,8 +5420,8 @@ intel_verify_planes(struct intel_atomic_state *state) plane_state->uapi.visible); } -int intel_modeset_all_pipes(struct intel_atomic_state *state, - const char *reason) +int intel_modeset_pipes_in_mask(struct intel_atomic_state *state, + const char *reason, u8 mask) { struct drm_i915_private *dev_priv = to_i915(state->base.dev); struct intel_crtc *crtc; @@ -5430,7 +5430,7 @@ int intel_modeset_all_pipes(struct intel_atomic_state *state, * Add all pipes to the state, and force * a modeset on all the active ones. */ - for_each_intel_crtc(&dev_priv->drm, crtc) { + for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, crtc, mask) { struct intel_crtc_state *crtc_state; int ret; @@ -5469,6 +5469,12 @@ int intel_modeset_all_pipes(struct intel_atomic_state *state, return 0; } +int intel_modeset_all_pipes(struct intel_atomic_state *state, + const char *reason) +{ + return intel_modeset_pipes_in_mask(state, reason, -1); +} + /* * This implements the workaround described in the "notes" section of the mode * set sequence documentation. When going from no pipes or single pipe to diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h index 49ac8473b988b..ffbabfc9e1e10 100644 --- a/drivers/gpu/drm/i915/display/intel_display.h +++ b/drivers/gpu/drm/i915/display/intel_display.h @@ -515,6 +515,8 @@ void intel_update_watermarks(struct drm_i915_private *i915); /* modesetting */ int intel_modeset_all_pipes(struct intel_atomic_state *state, const char *reason); +int intel_modeset_pipes_in_mask(struct intel_atomic_state *state, + const char *reason, u8 pipe_mask); void intel_modeset_get_crtc_power_domains(struct intel_crtc_state *crtc_state, struct intel_power_domain_mask *old_domains); void intel_modeset_put_crtc_power_domains(struct intel_crtc *crtc, -- 2.37.2