ac: Move has_local_buffers disable to radeonsi.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 9 Apr 2019 23:16:25 +0000 (01:16 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 15 Apr 2019 18:39:28 +0000 (20:39 +0200)
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 <samuel.pitoiset@gmail.com>
src/amd/common/ac_gpu_info.c
src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c

index c53335bbb7de65f829deafec580cb6155ff86965..afbb0239628dde8c7c3b45fd30d495b21afe9afa 100644 (file)
@@ -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;
index 79d2c1345efc61a3d8104fc89b1803edb51ddcb1..45e54b4791db412e6e01f60ded83aaa9d61ba9d6 100644 (file)
@@ -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);