Quoting Stuart Summers (2019-08-19 22:50:00) > Add a new function to determine whether a particular slice > has a given subslice. > > Signed-off-by: Stuart Summers <stuart.summers@xxxxxxxxx> > --- > drivers/gpu/drm/i915/gt/intel_sseu.h | 10 ++++++++++ > drivers/gpu/drm/i915/intel_device_info.c | 9 ++++----- > 2 files changed, 14 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gt/intel_sseu.h b/drivers/gpu/drm/i915/gt/intel_sseu.h > index 2261d4e7d98b..0ecc1c35a7a1 100644 > --- a/drivers/gpu/drm/i915/gt/intel_sseu.h > +++ b/drivers/gpu/drm/i915/gt/intel_sseu.h > @@ -66,6 +66,16 @@ intel_sseu_from_device_info(const struct sseu_dev_info *sseu) > return value; > } > > +static inline bool > +intel_sseu_has_subslice(const struct sseu_dev_info *sseu, int slice, > + int subslice) > +{ > + u8 mask = sseu->subslice_mask[slice * sseu->ss_stride + > + subslice / BITS_PER_BYTE]; > + Suggestion: GEM_BUG_ON(subslice >= sseu->ss_slice); > + return mask & BIT(subslice % BITS_PER_BYTE); > +} Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx