ac/gpu_info: Add has_pcie_bandwidth_info.

This is so that we can tell whether the current kernel
has the PCIe bandwidth info available or not.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20842>
This commit is contained in:
Timur Kristóf
2023-01-23 17:11:36 +01:00
committed by Marge Bot
parent d7730fcf22
commit ef668f3714
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -1355,8 +1355,9 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info)
info->num_rb = util_bitcount(info->enabled_rb_mask);
info->max_gflops = (info->gfx_level >= GFX11 ? 256 : 128) * info->num_cu * info->max_gpu_freq_mhz / 1000;
info->memory_bandwidth_gbps = DIV_ROUND_UP(info->memory_freq_mhz_effective * info->memory_bus_width / 8, 1000);
info->has_pcie_bandwidth_info = info->drm_minor >= 51;
if (info->drm_minor >= 51) {
if (info->has_pcie_bandwidth_info) {
info->pcie_gen = device_info.pcie_gen;
info->pcie_num_lanes = device_info.pcie_num_lanes;
+1
View File
@@ -200,6 +200,7 @@ struct radeon_info {
bool has_sparse_vm_mappings;
bool has_scheduled_fence_dependency;
bool has_gang_submit;
bool has_pcie_bandwidth_info;
bool has_stable_pstate;
/* Whether SR-IOV is enabled or amdgpu.mcbp=1 was set on the kernel command line. */
bool mid_command_buffer_preemption_enabled;