[Intel-gfx] [PATCH 6/9] drm/i915: Add function to determine if a slice has a subslice

Summers, Stuart stuart.summers at intel.com
Tue Aug 20 19:01:05 UTC 2019


On Tue, 2019-08-20 at 11:53 +0100, Chris Wilson wrote:
> 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 at intel.com>
> > ---
> >  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);

Thanks Chris and makes sense. I think this should  instead be (ss /
BITS_PER_BYTE >= ss_stride).

I'll post an update hopefully today on this. Let me know if you'd like
me to drop your R-B with the above change.

Thanks,
Stuart

> 
> > +       return mask & BIT(subslice % BITS_PER_BYTE);
> > +}
> 
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
> -Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3270 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20190820/03b369fb/attachment.bin>


More information about the Intel-gfx mailing list