intel/dev: don't forget to set max_eu_per_subslice in generated topology

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10015>
(cherry picked from commit d7c6a90c26)
This commit is contained in:
Lionel Landwerlin 2021-04-03 14:21:32 +03:00 committed by Dylan Baker
parent 20fa378805
commit bd7deb0686
2 changed files with 6 additions and 1 deletions

View file

@ -58,7 +58,7 @@
"description": "intel/dev: don't forget to set max_eu_per_subslice in generated topology",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -1081,6 +1081,10 @@ update_from_topology(struct intel_device_info *devinfo,
{
reset_masks(devinfo);
assert(topology->max_slices > 0);
assert(topology->max_subslices > 0);
assert(topology->max_eus_per_subslice > 0);
devinfo->subslice_slice_stride = topology->subslice_stride;
devinfo->eu_subslice_stride = DIV_ROUND_UP(topology->max_eus_per_subslice, 8);
@ -1176,6 +1180,7 @@ update_from_masks(struct intel_device_info *devinfo, uint32_t slice_mask,
uint32_t num_eu_per_subslice = DIV_ROUND_UP(n_eus, n_subslices);
uint32_t eu_mask = (1U << num_eu_per_subslice) - 1;
topology->max_eus_per_subslice = num_eu_per_subslice;
topology->eu_offset = topology->subslice_offset +
DIV_ROUND_UP(topology->max_subslices, 8);
topology->eu_stride = DIV_ROUND_UP(num_eu_per_subslice, 8);