intel/dev: Implement pixel pipe subslice counting for Gen12+.
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 4 Dec 2020 20:39:39 +0000 (12:39 -0800)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 24 Feb 2021 05:15:06 +0000 (21:15 -0800)
commite2ef1c46760ba6996fd49f5fc56d56e1af8d2220
tree0388d17aaf50c36ff19dbf0b72e02fa66f60475b
parentab076e19ed93b1240f21dcfaf48e0dbe70322966
intel/dev: Implement pixel pipe subslice counting for Gen12+.

Unlike Gen11, Gen12 hardware supports up to three pixel pipes per
slice.

Unfortunately the kernel interface is somewhat inconsistent between
Gen11 and Gen12: I915_PARAM_SUBSLICE_MASK returns a mask of enabled
*dual* subslices since TGL, so there is half the number of bits per
pixel pipe in the mask.  This is worked around here so we're able to
calculate the correct size of each pixel pipe, but the result is
returned in dual subslice units, inheriting the inconsistency from the
kernel -- Reason is that as of now all our Gen12 subslice counts
returned by gen_device_info.c are really dual subslice counts, and the
num_eu_per_subslice counts are also scaled accordingly, so it seems
like it would only make the matter worse if I fixed the units of this
field only without also fixing the rest.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8749>
src/intel/dev/gen_device_info.c
src/intel/dev/gen_device_info.h