From af9534b9f3f687f3603e621bf282f4c546240afa Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Wed, 10 Apr 2019 01:16:25 +0200 Subject: [PATCH] ac: Move has_local_buffers disable to radeonsi. In radv we had a separate flag to actually use it + an env option to experimentally use it. The common code setting has_local_buffers to false of course broke that experimental option. Also the "enable on APU" did not make sense for RADV as it is still disabled by default. Fixes: b21a4efb553 "radv/winsys: allow local BOs on APUs" Reviewed-by: Samuel Pitoiset --- src/amd/common/ac_gpu_info.c | 4 +--- src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c index c53335b..afbb023 100644 --- a/src/amd/common/ac_gpu_info.c +++ b/src/amd/common/ac_gpu_info.c @@ -367,9 +367,7 @@ bool ac_query_gpu_info(int fd, amdgpu_device_handle dev, info->has_syncobj_wait_for_submit = info->has_syncobj && info->drm_minor >= 20; info->has_fence_to_handle = info->has_syncobj && info->drm_minor >= 21; info->has_ctx_priority = info->drm_minor >= 22; - /* TODO: Enable this once the kernel handles it efficiently. */ - info->has_local_buffers = info->drm_minor >= 20 && - !info->has_dedicated_vram; + info->has_local_buffers = info->drm_minor >= 20; info->kernel_flushes_hdp_before_ib = true; info->htile_cmask_support_1d_tiling = true; info->si_TA_CS_BC_BASE_ADDR_allowed = true; diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c index 79d2c13..45e54b4 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c @@ -92,6 +92,10 @@ static bool do_winsys_init(struct amdgpu_winsys *ws, if (!ac_query_gpu_info(fd, ws->dev, &ws->info, &ws->amdinfo)) goto fail; + /* TODO: Enable this once the kernel handles it efficiently. */ + if (ws->info.has_dedicated_vram) + ws->info.has_local_buffers = false; + handle_env_var_force_family(ws); ws->addrlib = amdgpu_addr_create(&ws->info, &ws->amdinfo, &ws->info.max_alignment); -- 2.7.4