[Intel-gfx] [PATCH 6/9] drm/i915: Add function to determine if a slice has a subslice
Chris Wilson
chris at chris-wilson.co.uk
Tue Aug 20 10:53:23 UTC 2019
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);
> + return mask & BIT(subslice % BITS_PER_BYTE);
> +}
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris
More information about the Intel-gfx
mailing list