Mesa (staging/21.3): intel/dev: don't forget to set max_eu_per_subslice in generated topology

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Nov 7 21:49:51 UTC 2021


Module: Mesa
Branch: staging/21.3
Commit: 4093e20cfa632e534c8efe18999461f678670e98
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4093e20cfa632e534c8efe18999461f678670e98

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Sat Apr  3 14:21:32 2021 +0300

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

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Cc: <mesa-stable at lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez at riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10015>
(cherry picked from commit d7c6a90c26794eff623e8885f92ab27aaa0fe581)

---

 .pick_status.json                 | 2 +-
 src/intel/dev/intel_device_info.c | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index cb807adb9c6..5016cbb0415 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -103,7 +103,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
     },
diff --git a/src/intel/dev/intel_device_info.c b/src/intel/dev/intel_device_info.c
index 7039454b7e7..06c15661ff4 100644
--- a/src/intel/dev/intel_device_info.c
+++ b/src/intel/dev/intel_device_info.c
@@ -1089,6 +1089,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);
@@ -1184,6 +1188,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);



More information about the mesa-commit mailing list