gallium/radeon: allow VRAM-only placements again on APUs & recent amdgpu
authorMarek Olšák <marek.olsak@amd.com>
Mon, 23 Jan 2017 22:41:47 +0000 (23:41 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 30 Jan 2017 12:27:14 +0000 (13:27 +0100)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeon/r600_buffer_common.c

index c6f4d0d86eceb7f860e4eff51d5bd45caae46e56..da6f0206d78e6954aebdd7f60eed1f397f98f330 100644 (file)
@@ -170,8 +170,12 @@ void r600_init_resource_fields(struct r600_common_screen *rscreen,
        /* If VRAM is just stolen system memory, allow both VRAM and
         * GTT, whichever has free space. If a buffer is evicted from
         * VRAM to GTT, it will stay there.
+        *
+        * DRM 3.6.0 has good BO move throttling, so we can allow VRAM-only
+        * placements even with a low amount of stolen VRAM.
         */
        if (!rscreen->info.has_dedicated_vram &&
+           (rscreen->info.drm_major < 3 || rscreen->info.drm_minor < 6) &&
            res->domains == RADEON_DOMAIN_VRAM)
                res->domains = RADEON_DOMAIN_VRAM_GTT;