summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLeo Liu <leo.liu@amd.com>2017-04-03 14:52:15 -0400
committerLeo Liu <leo.liu@amd.com>2017-06-05 10:41:13 -0400
commit1851f1b57a96547d5b8f8b651768561ee6927b16 (patch)
tree2b8f1fa21212030e017c36dc23e72f107b6ba0bc /tests
parentec65d19809121b460c80b45509ed12a4cdbde4b8 (diff)
downloadlibdrm-1851f1b57a96547d5b8f8b651768561ee6927b16.tar.gz
libdrm-1851f1b57a96547d5b8f8b651768561ee6927b16.tar.bz2
libdrm-1851f1b57a96547d5b8f8b651768561ee6927b16.zip
tests/amdgpu: separate decode messages
AVC decode messages will be common with VCN decode 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.c3
-rw-r--r--tests/amdgpu/decode_messages.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/tests/amdgpu/cs_tests.c b/tests/amdgpu/cs_tests.c
index 65f2434b..fe78326f 100644
--- a/tests/amdgpu/cs_tests.c
+++ b/tests/amdgpu/cs_tests.c
@@ -289,7 +289,8 @@ static void amdgpu_cs_uvd_decode(void)
r = amdgpu_bo_cpu_map(buf_handle, (void **)&ptr);
CU_ASSERT_EQUAL(r, 0);
- memcpy(ptr, uvd_decode_msg, sizeof(uvd_create_msg));
+ memcpy(ptr, uvd_decode_msg, sizeof(uvd_decode_msg));
+ memcpy(ptr + sizeof(uvd_decode_msg), avc_decode_msg, sizeof(avc_decode_msg));
if (family_id >= AMDGPU_FAMILY_VI) {
ptr[0x10] = 7;
diff --git a/tests/amdgpu/decode_messages.h b/tests/amdgpu/decode_messages.h
index 09abc37e..edfba3b7 100644
--- a/tests/amdgpu/decode_messages.h
+++ b/tests/amdgpu/decode_messages.h
@@ -356,6 +356,9 @@ static const uint8_t uvd_decode_msg[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+};
+
+static const uint8_t avc_decode_msg[] = {
0x02,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x88,0x00,0x00,0x00,
0x01,0x00,0x00,0x01,0x00,0x03,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,