ac: don't call ac_query_pci_bus_info from ac_query_gpu_info
Instead let each driver call it. radeonsi ignores the error because it doesn't require correct pci-bus info to work properly. radv keeps the existing behavior and fails if the pci-bus infos is missing. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20645>
This commit is contained in:
@@ -621,9 +621,6 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info)
|
||||
STATIC_ASSERT(AMDGPU_HW_IP_VCN_ENC == AMD_IP_VCN_ENC);
|
||||
STATIC_ASSERT(AMDGPU_HW_IP_VCN_JPEG == AMD_IP_VCN_JPEG);
|
||||
|
||||
if (!ac_query_pci_bus_info(fd, info))
|
||||
return false;
|
||||
|
||||
assert(info->drm_major == 3);
|
||||
info->is_amdgpu = true;
|
||||
|
||||
|
||||
@@ -45,6 +45,9 @@ do_winsys_init(struct radv_amdgpu_winsys *ws, int fd)
|
||||
if (!ac_query_gpu_info(fd, ws->dev, &ws->info))
|
||||
return false;
|
||||
|
||||
if (!ac_query_pci_bus_info(fd, &ws->info))
|
||||
return false;
|
||||
|
||||
if (ws->info.drm_minor < 23) {
|
||||
fprintf(stderr, "radv/amdgpu: DRM 3.23+ is required (Linux kernel 4.15+)\n");
|
||||
return false;
|
||||
|
||||
@@ -98,6 +98,8 @@ static bool do_winsys_init(struct amdgpu_winsys *ws,
|
||||
if (!ac_query_gpu_info(fd, ws->dev, &ws->info))
|
||||
goto fail;
|
||||
|
||||
ac_query_pci_bus_info(fd, &ws->info);
|
||||
|
||||
/* TODO: Enable this once the kernel handles it efficiently. */
|
||||
if (ws->info.has_dedicated_vram)
|
||||
ws->info.has_local_buffers = false;
|
||||
|
||||
Reference in New Issue
Block a user