diff options
author | Stuart Summers <stuart.summers@intel.com> | 2019-05-24 18:40:20 +0300 |
---|---|---|
committer | Manasi Navare <manasi.d.navare@intel.com> | 2019-05-28 21:19:54 +0300 |
commit | b5ab1abe8df2cf38c94ffee46f0c8a377e01edb2 (patch) | |
tree | 6bf0cb21de2d60273e5d3abc3e471dd4c2c304db /drivers/gpu/drm/i915/gt/intel_sseu.h | |
parent | 135a63b68250b8ab2ed854f0c907d5ff2a56f09e (diff) | |
download | linux-b5ab1abe8df2cf38c94ffee46f0c8a377e01edb2.tar.xz |
drm/i915: Move calculation of subslices per slice to new function
Add a new function to return the number of subslices per slice to
consolidate code usage.
v2: rebase on changes to move sseu struct to intel_sseu.h
v3: add intel_* prefix to sseu_subslices_per_slice
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Stuart Summers <stuart.summers@intel.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190524154022.13575-4-stuart.summers@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/gt/intel_sseu.h')
-rw-r--r-- | drivers/gpu/drm/i915/gt/intel_sseu.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_sseu.h b/drivers/gpu/drm/i915/gt/intel_sseu.h index d20b7f96907d..9618dff46d83 100644 --- a/drivers/gpu/drm/i915/gt/intel_sseu.h +++ b/drivers/gpu/drm/i915/gt/intel_sseu.h @@ -63,6 +63,12 @@ intel_sseu_from_device_info(const struct sseu_dev_info *sseu) return value; } +static inline unsigned int +intel_sseu_subslices_per_slice(const struct sseu_dev_info *sseu, u8 slice) +{ + return hweight8(sseu->subslice_mask[slice]); +} + u32 intel_sseu_make_rpcs(struct drm_i915_private *i915, const struct intel_sseu *req_sseu); |