On Wed, Oct 21, 2015 at 06:40:37PM +0300, Imre Deak wrote: > Currently when checking for fused off EUs we may ignore the EU count in > an enabled slice if there is any disabled slice preceding the enabled > one (with a lower slice ID). Perhaps this can't happen in reality, but > there is no reason to have this assumption built-in, the code is clearer > without it. > > Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx> > --- > drivers/gpu/drm/i915/i915_debugfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c > index 24504a3..1d43624 100644 > --- a/drivers/gpu/drm/i915/i915_debugfs.c > +++ b/drivers/gpu/drm/i915/i915_debugfs.c > @@ -5054,7 +5054,7 @@ static void broadwell_sseu_device_status(struct drm_device *dev, > sseu_subslice_total(stat); > > /* subtract fused off EU(s) from enabled slice(s) */ > - for (s = 0; s < hweight32(stat->slice_mask); s++) { > + for (s = 0; s < fls(stat->slice_mask); s++) { Could use for_each_set_bit here too. > u8 subslice_7eu = INTEL_INFO(dev)->sseu.subslice_7eu[s]; > > stat->eu_total -= hweight8(subslice_7eu); 6 & 7 are: Reviewed-by: Ben Widawsky <benjamin.widawsky@xxxxxxxxx> 1-7 are also: Tested-by: Ben Widawsky <benjamin.widawsky@xxxxxxxxx> -- Ben Widawsky, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx