aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLeo Liu2017-04-03 13:59:15 -0500
committerLeo Liu2017-06-05 09:41:13 -0500
commit01096f2122234c48c959b5bcf451873de459bc47 (patch)
tree9e47a4c11a945154b83a538af965da8c47412d75 /tests
parent1851f1b57a96547d5b8f8b651768561ee6927b16 (diff)
downloadexternal-libdrm-01096f2122234c48c959b5bcf451873de459bc47.tar.gz
external-libdrm-01096f2122234c48c959b5bcf451873de459bc47.tar.xz
external-libdrm-01096f2122234c48c959b5bcf451873de459bc47.zip
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>
Diffstat (limited to 'tests')
-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)
378 /* TODO: use a real CRC32 */ 378 /* TODO: use a real CRC32 */
379 for (i = 0, sum = 0; i < dt_size; ++i) 379 for (i = 0, sum = 0; i < dt_size; ++i)
380 sum += ptr[i]; 380 sum += ptr[i];
381 CU_ASSERT_EQUAL(sum, 0x20345d8); 381 CU_ASSERT_EQUAL(sum, SUM_DECODE);
382 382
383 r = amdgpu_bo_cpu_unmap(buf_handle); 383 r = amdgpu_bo_cpu_unmap(buf_handle);
384 CU_ASSERT_EQUAL(r, 0); 384 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 @@
24#ifndef _DECODE_MESSAGES_H_ 24#ifndef _DECODE_MESSAGES_H_
25#define _DECODE_MESSAGES_H_ 25#define _DECODE_MESSAGES_H_
26 26
27#define SUM_DECODE 0x20345d8
28
27static const uint8_t uvd_create_msg[] = { 29static const uint8_t uvd_create_msg[] = {
28 0xe4,0x0d,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x44,0x40,0x00,0x00,0x00,0x00, 30 0xe4,0x0d,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x44,0x40,0x00,0x00,0x00,0x00,
29 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x03,0x00,0x00, 31 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x03,0x00,0x00,