summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_buffer.c6
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_winsys.c1
2 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_buffer.c b/src/gallium/drivers/radeonsi/si_buffer.c
index 504e0c723dc..2d68edc3404 100644
--- a/src/gallium/drivers/radeonsi/si_buffer.c
+++ b/src/gallium/drivers/radeonsi/si_buffer.c
@@ -125,8 +125,7 @@ void si_init_resource_fields(struct si_screen *sscreen,
/* Older kernels didn't always flush the HDP cache before
* CS execution
*/
- if (sscreen->info.drm_major == 2 &&
- sscreen->info.drm_minor < 40) {
+ if (!sscreen->info.kernel_flushes_hdp_before_ib) {
res->domains = RADEON_DOMAIN_GTT;
res->flags |= RADEON_FLAG_GTT_WC;
break;
@@ -153,8 +152,7 @@ void si_init_resource_fields(struct si_screen *sscreen,
* ensures all CPU writes finish before the GPU
* executes a command stream.
*/
- if (sscreen->info.drm_major == 2 &&
- sscreen->info.drm_minor < 40)
+ if (!sscreen->info.kernel_flushes_hdp_before_ib)
res->domains = RADEON_DOMAIN_GTT;
}
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
index 253dd4e2eb6..6e3162d1cf3 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
@@ -528,6 +528,7 @@ static bool do_winsys_init(struct radeon_drm_winsys *ws)
ws->accel_working2 < 3);
ws->info.tcc_cache_line_size = 64; /* TC L2 line size on GCN */
ws->info.ib_start_alignment = 4096;
+ ws->info.kernel_flushes_hdp_before_ib = ws->info.drm_minor >= 40;
ws->check_vm = strstr(debug_get_option("R600_DEBUG", ""), "check_vm") != NULL;