Quoting Imre Deak (2020-11-30 21:21:54) > Add wakeref tracking for display power domain references taken for > enabled CRTCs. > > Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx> > --- > drivers/gpu/drm/i915/display/intel_display.c | 38 ++++++++----------- > .../drm/i915/display/intel_display_types.h | 2 +- > 2 files changed, 17 insertions(+), 23 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c > index d80d15d96d4c..a6043197171b 100644 > --- a/drivers/gpu/drm/i915/display/intel_display.c > +++ b/drivers/gpu/drm/i915/display/intel_display.c > @@ -7575,25 +7575,25 @@ modeset_get_crtc_power_domains(struct intel_crtc_state *crtc_state) > enum intel_display_power_domain domain; > u64 domains, new_domains, old_domains; > > - old_domains = crtc->enabled_power_domains; > - crtc->enabled_power_domains = new_domains = > - get_crtc_power_domains(crtc_state); > + domains = get_crtc_power_domains(crtc_state); > > - domains = new_domains & ~old_domains; > + new_domains = domains & ~crtc->enabled_power_domains.mask; > + old_domains = crtc->enabled_power_domains.mask & ~domains; new / old denote the changes. > > - for_each_power_domain(domain, domains) > - intel_display_power_get(dev_priv, domain); > + for_each_power_domain(domain, new_domains) > + intel_display_power_get_in_set(dev_priv, > + &crtc->enabled_power_domains, > + domain); > > - return old_domains & ~new_domains; > + return old_domains; Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx