From 9ef8ea1451eb8c830ebe3017aee4d59ffdb24df7 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 30 Oct 2018 12:29:13 +0100 Subject: [PATCH] radv: use WAIT_REG_MEM_GREATER_OR_EQUAL instead of a magic value Signed-off-by: Samuel Pitoiset Reviewed-by: Dave Airlie --- src/amd/common/sid.h | 1 + src/amd/vulkan/radv_query.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/amd/common/sid.h b/src/amd/common/sid.h index d88ecf55806..5c53133147f 100644 --- a/src/amd/common/sid.h +++ b/src/amd/common/sid.h @@ -146,6 +146,7 @@ #define PKT3_WAIT_REG_MEM 0x3C #define WAIT_REG_MEM_EQUAL 3 #define WAIT_REG_MEM_NOT_EQUAL 4 +#define WAIT_REG_MEM_GREATER_OR_EQUAL 5 #define WAIT_REG_MEM_MEM_SPACE(x) (((unsigned)(x) & 0x3) << 4) #define WAIT_REG_MEM_PFP (1 << 8) #define PKT3_MEM_WRITE 0x3D /* not on CIK */ diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c index 318d6c7afee..57ea22fb847 100644 --- a/src/amd/vulkan/radv_query.c +++ b/src/amd/vulkan/radv_query.c @@ -1039,7 +1039,7 @@ void radv_CmdCopyQueryPoolResults( /* Waits on the upper word of the last DB entry */ radeon_emit(cs, PKT3(PKT3_WAIT_REG_MEM, 5, 0)); - radeon_emit(cs, 5 | WAIT_REG_MEM_MEM_SPACE(1)); + radeon_emit(cs, WAIT_REG_MEM_GREATER_OR_EQUAL | WAIT_REG_MEM_MEM_SPACE(1)); radeon_emit(cs, src_va); radeon_emit(cs, src_va >> 32); radeon_emit(cs, 0x80000000); /* reference value */ -- 2.30.2