drm/i915: Add macro for SSEU stride calculation
authorStuart Summers <stuart.summers@intel.com>
Fri, 24 May 2019 15:40:19 +0000 (08:40 -0700)
committerManasi Navare <manasi.d.navare@intel.com>
Tue, 28 May 2019 18:18:17 +0000 (11:18 -0700)
commit135a63b68250b8ab2ed854f0c907d5ff2a56f09e
treec4fb86e15e93061e7582fbecb389ebb79d38d8e7
parentbd41ca49a2735eb2f016a3fa4fe9716b56b55d71
drm/i915: Add macro for SSEU stride calculation

Subslice stride and EU stride are calculated multiple times in
i915_query. Move this calculation to a macro to reduce code duplication.

v2: update headers in intel_sseu.h
v3: use GEN_SSEU_STRIDE for stride calculations in intel_sseu.h
    apply s/bits/max_entries/ to GEN_SSEU_STRIDE parameter

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-3-stuart.summers@intel.com
drivers/gpu/drm/i915/gt/intel_sseu.h
drivers/gpu/drm/i915/i915_query.c
drivers/gpu/drm/i915/intel_device_info.h