Module: Mesa
Branch: master
Commit: cecc0687744428c62139dab2aa28d944285dfd91
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=cecc0687744428c62139dab2aa28d944285dfd91

Author: Marek Olšák <[email protected]>
Date:   Mon Jan 23 23:41:47 2017 +0100

gallium/radeon: allow VRAM-only placements again on APUs & recent amdgpu

Reviewed-by: Nicolai Hähnle <[email protected]>

---

 src/gallium/drivers/radeon/r600_buffer_common.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c 
b/src/gallium/drivers/radeon/r600_buffer_common.c
index c6f4d0d..da6f020 100644
--- a/src/gallium/drivers/radeon/r600_buffer_common.c
+++ b/src/gallium/drivers/radeon/r600_buffer_common.c
@@ -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;
 

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to