drm/i915/sseu: Don't overallocate subslice storage
authorMatt Roper <matthew.d.roper@intel.com>
Fri, 11 Mar 2022 22:54:58 +0000 (14:54 -0800)
committerMatt Roper <matthew.d.roper@intel.com>
Mon, 14 Mar 2022 16:33:47 +0000 (09:33 -0700)
commit144ce0ac634a38a123f970a62210da70b4ce662a
tree3a6ad7d6de1213892b604334035f2ebd7c8885a4
parent239bbb2fe927ed762bfe6307ba6a2e2d94e739da
drm/i915/sseu: Don't overallocate subslice storage

Xe_HP removed "slice" as a first-class unit in the hardware design.
Instead we now have a single pool of subslices (which are now referred
to as "DSS") that different hardware units have different ways of
grouping ("compute slices," "geometry slices," etc.).  For the purposes
of topology representation, we treat Xe_HP-based platforms as having a
single slice that contains all of the platform's DSS.  There's no need
to allocate storage space for (max legacy slices * max dss); let's
update some of our macros to minimize the storage requirement for sseu
topology.  We'll also document some of the constants to make it a little
bit more clear what they represent.

v2:
 - s/LEGACY/HSW/ in macro names.  (Lucas)
 - Rename MAX() to SSEU_MAX() to avoid any potential clashes with other
   definitions elsewhere.  Unfortunately max()/max_t() from
   linux/minmax.h cannot be used in this context.  (Lucas)

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220311225459.385515-1-matthew.d.roper@intel.com
drivers/gpu/drm/i915/gt/intel_engine_types.h
drivers/gpu/drm/i915/gt/intel_sseu.h