summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Liu <leo.liu@amd.com>2017-04-03 14:59:15 -0400
committerHawking Zhang <Hawking.Zhang@amd.com>2017-05-17 16:50:51 +0800
commit04204f0ed095a3fdd73d7be80bf52bc2ca83b0b3 (patch)
tree160ba7a6878438b6725d811d2e8e487ff2de9597
parentfd3fac8b1ab75b87f5ab9e29e6e656ddff61303a (diff)
tests/amdgpu: move decode sum to common
Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian K├Ânig <christian.koenig@amd.com>
-rw-r--r--tests/amdgpu/cs_tests.c2
-rw-r--r--tests/amdgpu/decode_messages.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/tests/amdgpu/cs_tests.c b/tests/amdgpu/cs_tests.c
index fe78326f..081ec9c2 100644
--- a/tests/amdgpu/cs_tests.c
+++ b/tests/amdgpu/cs_tests.c
@@ -378,7 +378,7 @@ static void amdgpu_cs_uvd_decode(void)
/* TODO: use a real CRC32 */
for (i = 0, sum = 0; i < dt_size; ++i)
sum += ptr[i];
- CU_ASSERT_EQUAL(sum, 0x20345d8);
+ CU_ASSERT_EQUAL(sum, SUM_DECODE);
r = amdgpu_bo_cpu_unmap(buf_handle);
CU_ASSERT_EQUAL(r, 0);
diff --git a/tests/amdgpu/decode_messages.h b/tests/amdgpu/decode_messages.h
index edfba3b7..c5c96f80 100644
--- a/tests/amdgpu/decode_messages.h
+++ b/tests/amdgpu/decode_messages.h
@@ -24,6 +24,8 @@
#ifndef _DECODE_MESSAGES_H_
#define _DECODE_MESSAGES_H_
+#define SUM_DECODE 0x20345d8
+
static const uint8_t uvd_create_msg[] = {
0xe4,0x0d,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x44,0x40,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x03,0x00,0x00,