Skip to contentSkip to conversation

tests/amdgpu/vcn: fix the nop command in IBs

PATCH In review Liu, Leo 3 participants 3 messages Dec 11, 2018 1 message not in the archive

lore
Share & tools
lore

Liu, Leo

author
#0 lore raw

PATCH 1/1 tests/amdgpu/vcn: fix the nop command in IBs

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

---
 tests/amdgpu/vcn_tests.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
tests/amdgpu/vcn_tests.c +12 -6
index d9f05af8..859ec496 100644
@@ -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);
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

Reviewed-by Boyuan Zhang
#2 lore raw

Patch is

Regards,
Boyuan

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Liu, Leo
Sent: December-11-18 4:04 PM
To: [email protected]; [email protected]
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

---
 tests/amdgpu/vcn_tests.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
tests/amdgpu/vcn_tests.c +12 -6
index d9f05af8..859ec496 100644
@@ -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);
Signature · 10 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#3 lore raw
In reply to Liu, Leo

________________________________
From: amd-gfx <[email protected]> on behalf of Liu, Leo <[email protected]>
Sent: Tuesday, December 11, 2018 4:03 PM
To: [email protected]; [email protected]
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

---
 tests/amdgpu/vcn_tests.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
tests/amdgpu/vcn_tests.c +12 -6
index d9f05af8..859ec496 100644
@@ -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);

--
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
amd-gfx Info Page - freedesktop.org<https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
lists.freedesktop.org
To see the collection of prior postings to the list, visit the amd-gfx Archives.. Using amd-gfx: To post a message to all the list members, send email to [email protected]. You can subscribe to the list, or change your existing subscription, in the sections below.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel