Commit 7e2aa820 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Use for_each_intel_crtc_in_pipe_mask() more

Convert a few hand roller for_each_intel_crtc_in_pipe_mask()
to the real thing.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220203183823.22890-9-ville.syrjala@linux.intel.comReviewed-by: default avatarManasi Navare <manasi.d.navare@intel.com>
parent f461ea5d
...@@ -3867,14 +3867,12 @@ static u8 enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv) ...@@ -3867,14 +3867,12 @@ static u8 enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv)
u8 master_pipes = 0, slave_pipes = 0; u8 master_pipes = 0, slave_pipes = 0;
struct intel_crtc *crtc; struct intel_crtc *crtc;
for_each_intel_crtc(&dev_priv->drm, crtc) { for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, crtc,
bigjoiner_pipes(dev_priv)) {
enum intel_display_power_domain power_domain; enum intel_display_power_domain power_domain;
enum pipe pipe = crtc->pipe; enum pipe pipe = crtc->pipe;
intel_wakeref_t wakeref; intel_wakeref_t wakeref;
if ((bigjoiner_pipes(dev_priv) & BIT(pipe)) == 0)
continue;
power_domain = intel_dsc_power_domain(crtc, (enum transcoder) pipe); power_domain = intel_dsc_power_domain(crtc, (enum transcoder) pipe);
with_intel_display_power_if_enabled(dev_priv, power_domain, wakeref) { with_intel_display_power_if_enabled(dev_priv, power_domain, wakeref) {
u32 tmp = intel_de_read(dev_priv, ICL_PIPE_DSS_CTL1(pipe)); u32 tmp = intel_de_read(dev_priv, ICL_PIPE_DSS_CTL1(pipe));
...@@ -8779,10 +8777,8 @@ static u32 intel_encoder_possible_crtcs(struct intel_encoder *encoder) ...@@ -8779,10 +8777,8 @@ static u32 intel_encoder_possible_crtcs(struct intel_encoder *encoder)
struct intel_crtc *crtc; struct intel_crtc *crtc;
u32 possible_crtcs = 0; u32 possible_crtcs = 0;
for_each_intel_crtc(dev, crtc) { for_each_intel_crtc_in_pipe_mask(dev, crtc, encoder->pipe_mask)
if (encoder->pipe_mask & BIT(crtc->pipe)) possible_crtcs |= drm_crtc_mask(&crtc->base);
possible_crtcs |= drm_crtc_mask(&crtc->base);
}
return possible_crtcs; return possible_crtcs;
} }
......
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