Skip to content

Commit

Permalink
drm/i915: Use for_each_intel_crtc_in_pipe_mask() more
Browse files Browse the repository at this point in the history
Convert a few hand roller for_each_intel_crtc_in_pipe_mask()
to the real thing.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220203183823.22890-9-ville.syrjala@linux.intel.com
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
  • Loading branch information
Ville Syrjälä committed Feb 15, 2022
1 parent f461ea5 commit 7e2aa82
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions drivers/gpu/drm/i915/display/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -3867,14 +3867,12 @@ static u8 enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv)
u8 master_pipes = 0, slave_pipes = 0;
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 pipe pipe = crtc->pipe;
intel_wakeref_t wakeref;

if ((bigjoiner_pipes(dev_priv) & BIT(pipe)) == 0)
continue;

power_domain = intel_dsc_power_domain(crtc, (enum transcoder) pipe);
with_intel_display_power_if_enabled(dev_priv, power_domain, wakeref) {
u32 tmp = intel_de_read(dev_priv, ICL_PIPE_DSS_CTL1(pipe));
Expand Down Expand Up @@ -8779,10 +8777,8 @@ static u32 intel_encoder_possible_crtcs(struct intel_encoder *encoder)
struct intel_crtc *crtc;
u32 possible_crtcs = 0;

for_each_intel_crtc(dev, crtc) {
if (encoder->pipe_mask & BIT(crtc->pipe))
possible_crtcs |= drm_crtc_mask(&crtc->base);
}
for_each_intel_crtc_in_pipe_mask(dev, crtc, encoder->pipe_mask)
possible_crtcs |= drm_crtc_mask(&crtc->base);

return possible_crtcs;
}
Expand Down

0 comments on commit 7e2aa82

Please sign in to comment.