winsys/amdgpu: allow local BOs on APUs
authorMarek Olšák <marek.olsak@amd.com>
Wed, 28 Mar 2018 00:46:18 +0000 (20:46 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 13 Apr 2018 16:31:04 +0000 (12:31 -0400)
Local BOs ignore BO priorities, and we don't need those on APUs.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
src/amd/common/ac_gpu_info.c

index 0c131d0..ef0364b 100644 (file)
@@ -314,7 +314,8 @@ bool ac_query_gpu_info(int fd, amdgpu_device_handle dev,
        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 = ws->info.drm_minor >= 20;*/
+       info->has_local_buffers = info->drm_minor >= 20 &&
+                                 !info->has_dedicated_vram;
        info->num_render_backends = amdinfo->rb_pipes;
        info->clock_crystal_freq = amdinfo->gpu_counter_freq;
        if (!info->clock_crystal_freq) {