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>
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;
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;