ac/gpu_info: fix detection of smart access memory
chip_class was 0. Move the code after setting chip_class. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5282 Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12656>
This commit is contained in:
@@ -553,10 +553,6 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info,
|
||||
info->all_vram_visible = info->vram_size * 0.9 < info->vram_vis_size;
|
||||
|
||||
util_cpu_detect();
|
||||
info->smart_access_memory = info->all_vram_visible &&
|
||||
info->chip_class >= GFX10_3 &&
|
||||
util_get_cpu_caps()->family >= CPU_AMD_ZEN3 &&
|
||||
util_get_cpu_caps()->family < CPU_AMD_LAST;
|
||||
|
||||
/* Set chip identification. */
|
||||
info->pci_id = amdinfo->asic_id; /* TODO: is this correct? */
|
||||
@@ -653,6 +649,11 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info,
|
||||
return false;
|
||||
}
|
||||
|
||||
info->smart_access_memory = info->all_vram_visible &&
|
||||
info->chip_class >= GFX10_3 &&
|
||||
util_get_cpu_caps()->family >= CPU_AMD_ZEN3 &&
|
||||
util_get_cpu_caps()->family < CPU_AMD_LAST;
|
||||
|
||||
info->family_id = amdinfo->family_id;
|
||||
info->chip_external_rev = amdinfo->chip_external_rev;
|
||||
info->marketing_name = amdgpu_get_marketing_name(dev);
|
||||
|
||||
Reference in New Issue
Block a user