diff mbox series

[libdrm] tests/amdgpu/vcn: fix the nop command in IBs

Message ID 20181211210318.10807-1-leo.liu@amd.com (mailing list archive)
State New, archived
Headers show
Series [libdrm] tests/amdgpu/vcn: fix the nop command in IBs | expand

Commit Message

Leo Liu Dec. 11, 2018, 9:03 p.m. UTC
Just make them properly i.e. put 0 to the Nop reg

Signed-off-by: Leo Liu <leo.liu@amd.com>
---
 tests/amdgpu/vcn_tests.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

Comments

Zhang, Boyuan Dec. 11, 2018, 9:06 p.m. UTC | #1
Patch is 
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>

Regards,
Boyuan

-----Original Message-----
From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf Of Liu, Leo
Sent: December-11-18 4:04 PM
To: amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org
Cc: Liu, Leo
Subject: [PATCH libdrm] tests/amdgpu/vcn: fix the nop command in IBs

Just make them properly i.e. put 0 to the Nop reg

Signed-off-by: Leo Liu <leo.liu@amd.com>
---
 tests/amdgpu/vcn_tests.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/tests/amdgpu/vcn_tests.c b/tests/amdgpu/vcn_tests.c
index d9f05af8..859ec496 100644
--- a/tests/amdgpu/vcn_tests.c
+++ b/tests/amdgpu/vcn_tests.c
@@ -268,8 +268,10 @@ static void amdgpu_cs_vcn_dec_create(void)
 	ib_cpu[len++] = msg_buf.addr >> 32;
 	ib_cpu[len++] = 0x81C3;
 	ib_cpu[len++] = 0;
-	for (; len % 16; ++len)
-		ib_cpu[len] = 0x81ff;
+	for (; len % 16; ) {
+		ib_cpu[len++] = 0x81ff;
+		ib_cpu[len++] = 0;
+	}
 
 	r = submit(len, AMDGPU_HW_IP_VCN_DEC);
 	CU_ASSERT_EQUAL(r, 0);
@@ -336,8 +338,10 @@ static void amdgpu_cs_vcn_dec_decode(void)
 
 	ib_cpu[len++] = 0x81C6;
 	ib_cpu[len++] = 0x1;
-	for (; len % 16; ++len)
-		ib_cpu[len] = 0x80000000;
+	for (; len % 16; ) {
+		ib_cpu[len++] = 0x81ff;
+		ib_cpu[len++] = 0;
+	}
 
 	r = submit(len, AMDGPU_HW_IP_VCN_DEC);
 	CU_ASSERT_EQUAL(r, 0);
@@ -373,8 +377,10 @@ static void amdgpu_cs_vcn_dec_destroy(void)
 	ib_cpu[len++] = msg_buf.addr >> 32;
 	ib_cpu[len++] = 0x81C3;
 	ib_cpu[len++] = 0;
-	for (; len % 16; ++len)
-		ib_cpu[len] = 0x80000000;
+	for (; len % 16; ) {
+		ib_cpu[len++] = 0x81ff;
+		ib_cpu[len++] = 0;
+	}
 
 	r = submit(len, AMDGPU_HW_IP_VCN_DEC);
 	CU_ASSERT_EQUAL(r, 0);
Alex Deucher Dec. 11, 2018, 9:11 p.m. UTC | #2
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
diff mbox series

Patch

diff --git a/tests/amdgpu/vcn_tests.c b/tests/amdgpu/vcn_tests.c
index d9f05af8..859ec496 100644
--- a/tests/amdgpu/vcn_tests.c
+++ b/tests/amdgpu/vcn_tests.c
@@ -268,8 +268,10 @@  static void amdgpu_cs_vcn_dec_create(void)
 	ib_cpu[len++] = msg_buf.addr >> 32;
 	ib_cpu[len++] = 0x81C3;
 	ib_cpu[len++] = 0;
-	for (; len % 16; ++len)
-		ib_cpu[len] = 0x81ff;
+	for (; len % 16; ) {
+		ib_cpu[len++] = 0x81ff;
+		ib_cpu[len++] = 0;
+	}
 
 	r = submit(len, AMDGPU_HW_IP_VCN_DEC);
 	CU_ASSERT_EQUAL(r, 0);
@@ -336,8 +338,10 @@  static void amdgpu_cs_vcn_dec_decode(void)
 
 	ib_cpu[len++] = 0x81C6;
 	ib_cpu[len++] = 0x1;
-	for (; len % 16; ++len)
-		ib_cpu[len] = 0x80000000;
+	for (; len % 16; ) {
+		ib_cpu[len++] = 0x81ff;
+		ib_cpu[len++] = 0;
+	}
 
 	r = submit(len, AMDGPU_HW_IP_VCN_DEC);
 	CU_ASSERT_EQUAL(r, 0);
@@ -373,8 +377,10 @@  static void amdgpu_cs_vcn_dec_destroy(void)
 	ib_cpu[len++] = msg_buf.addr >> 32;
 	ib_cpu[len++] = 0x81C3;
 	ib_cpu[len++] = 0;
-	for (; len % 16; ++len)
-		ib_cpu[len] = 0x80000000;
+	for (; len % 16; ) {
+		ib_cpu[len++] = 0x81ff;
+		ib_cpu[len++] = 0;
+	}
 
 	r = submit(len, AMDGPU_HW_IP_VCN_DEC);
 	CU_ASSERT_EQUAL(r, 0);