mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 23:50:11 +01:00
intel/dev: Set L3 bank count for Xe2+ from Xe KMD
Rather than updating intel_device_info_update_l3_banks(), the Xe KMD provides this info via the DRM_XE_DEVICE_QUERY_GT_TOPOLOGY query item. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31894>
This commit is contained in:
parent
2d5b574b8d
commit
39fab9b240
1 changed files with 13 additions and 3 deletions
|
|
@ -186,7 +186,8 @@ static void
|
|||
xe_compute_topology(struct intel_device_info * devinfo,
|
||||
const uint8_t *geo_dss_mask,
|
||||
const uint32_t geo_dss_num_bytes,
|
||||
const uint32_t *eu_per_dss_mask)
|
||||
const uint32_t *eu_per_dss_mask,
|
||||
const unsigned l3_banks)
|
||||
{
|
||||
intel_device_info_topology_reset_masks(devinfo);
|
||||
/* TGL/DG1/ADL-P: 1 slice x 6 dual sub slices
|
||||
|
|
@ -269,7 +270,10 @@ xe_compute_topology(struct intel_device_info * devinfo,
|
|||
|
||||
intel_device_info_topology_update_counts(devinfo);
|
||||
intel_device_info_update_pixel_pipes(devinfo, devinfo->subslice_masks);
|
||||
intel_device_info_update_l3_banks(devinfo);
|
||||
if (devinfo->ver != 12)
|
||||
devinfo->l3_banks = l3_banks;
|
||||
else
|
||||
intel_device_info_update_l3_banks(devinfo);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
@ -283,6 +287,7 @@ xe_query_topology(int fd, struct intel_device_info *devinfo)
|
|||
|
||||
uint32_t geo_dss_num_bytes = 0, *eu_per_dss_mask = NULL;
|
||||
uint8_t *geo_dss_mask = NULL, *tmp;
|
||||
unsigned l3_banks = 0;
|
||||
const struct drm_xe_query_topology_mask *head = topology;
|
||||
|
||||
tmp = (uint8_t *)topology + len;
|
||||
|
|
@ -295,6 +300,10 @@ xe_query_topology(int fd, struct intel_device_info *devinfo)
|
|||
geo_dss_mask = topology->mask;
|
||||
geo_dss_num_bytes = topology->num_bytes;
|
||||
break;
|
||||
case DRM_XE_TOPO_L3_BANK:
|
||||
for (int i = 0; i < topology->num_bytes; i++)
|
||||
l3_banks += util_bitcount(topology->mask[i]);
|
||||
break;
|
||||
case DRM_XE_TOPO_EU_PER_DSS:
|
||||
case DRM_XE_TOPO_SIMD16_EU_PER_DSS:
|
||||
eu_per_dss_mask = (uint32_t *)topology->mask;
|
||||
|
|
@ -311,7 +320,8 @@ xe_query_topology(int fd, struct intel_device_info *devinfo)
|
|||
goto parse_failed;
|
||||
}
|
||||
|
||||
xe_compute_topology(devinfo, geo_dss_mask, geo_dss_num_bytes, eu_per_dss_mask);
|
||||
xe_compute_topology(devinfo, geo_dss_mask, geo_dss_num_bytes,
|
||||
eu_per_dss_mask, l3_banks);
|
||||
|
||||
parse_failed:
|
||||
free((void *)head);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue