radeonsi: drop support for LLVM 3.6 & 3.7
[mesa.git] / src / gallium / winsys / amdgpu / drm / amdgpu_winsys.c
index 6511c4855d8240840b8fa240d32b068b99d4be7d..4a4e06cc3df95fd4ab22ae1b5074197cdb2dbec2 100644 (file)
@@ -230,14 +230,6 @@ static bool do_winsys_init(struct amdgpu_winsys *ws, int fd)
       goto fail;
    }
 
-   /* LLVM 3.6.1 is required for VI. */
-   if (ws->info.chip_class >= VI &&
-       HAVE_LLVM == 0x0306 && MESA_LLVM_VERSION_PATCH < 1) {
-      fprintf(stderr, "amdgpu: LLVM 3.6.1 is required, got LLVM %i.%i.%i\n",
-              HAVE_LLVM >> 8, HAVE_LLVM & 255, MESA_LLVM_VERSION_PATCH);
-      goto fail;
-   }
-
    /* family and rev_id are for addrlib */
    switch (ws->info.family) {
    case CHIP_TAHITI:
@@ -331,8 +323,10 @@ static bool do_winsys_init(struct amdgpu_winsys *ws, int fd)
    ws->info.gart_size = gtt.heap_size;
    ws->info.vram_size = vram.heap_size;
    ws->info.vram_vis_size = vram_vis.heap_size;
-   /* The kernel can split large buffers, so we can do large allocations. */
-   ws->info.max_alloc_size = MAX2(ws->info.vram_size, ws->info.gart_size) * 0.9;
+   /* The kernel can split large buffers in VRAM but not in GTT, so large
+    * allocations can fail or cause buffer movement failures in the kernel.
+    */
+   ws->info.max_alloc_size = MIN2(ws->info.vram_size * 0.9, ws->info.gart_size * 0.7);
    /* convert the shader clock from KHz to MHz */
    ws->info.max_shader_clock = ws->amdinfo.max_engine_clk / 1000;
    ws->info.max_se = ws->amdinfo.num_shader_engines;