From 9322974ec716b8c3b2e326559f663ff087daa38c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 8 Jun 2018 21:48:23 -0400 Subject: [PATCH] radeonsi: always put persistent buffers into GTT on radeon MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This improves performance for certain games. Cc: 18.1 Tested-by: Dieter Nützel --- src/gallium/drivers/radeonsi/si_buffer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_buffer.c b/src/gallium/drivers/radeonsi/si_buffer.c index 2d68edc..0546fa9 100644 --- a/src/gallium/drivers/radeonsi/si_buffer.c +++ b/src/gallium/drivers/radeonsi/si_buffer.c @@ -151,8 +151,12 @@ void si_init_resource_fields(struct si_screen *sscreen, * Write-combined CPU mappings are fine, the kernel * ensures all CPU writes finish before the GPU * executes a command stream. + * + * radeon doesn't have good BO move throttling, so put all + * persistent buffers into GTT to prevent VRAM CPU page faults. */ - if (!sscreen->info.kernel_flushes_hdp_before_ib) + if (!sscreen->info.kernel_flushes_hdp_before_ib || + sscreen->info.drm_major == 2) res->domains = RADEON_DOMAIN_GTT; } -- 2.7.4