Skip to contentSkip to conversation

fix field names for INDIRECT_BUFFER_CONST/CIK for gfx9/gfx10

PATCH Superseded Xiaojie Yuan 2 participants 3 messages Feb 19, 2020

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix field names for INDIRECT_BUFFER_CONST/CIK for gfx9/gfx10

field names for INDIRECT_BUFFER_CONST/CIK of gfx9/gfx10 are the same. fields like OFFLOAD_POLLING and VALID are defined in mec's INDIRECT_BUFFER packet, so not applicable here.

---
 src/lib/ring_decode.c | 23 +++++++----------------
 1 file changed, 7 insertions(+), 16 deletions(-)
src/lib/ring_decode.c +7 -16
index 250dfd7..fa44f27 100644
@@ -617,22 +617,13 @@ static void print_decode_pm4_pkt3(struct umr_asic *asic, struct umr_ring_decoder
 				case 2: printf("IB_SIZE:%s%lu%s, VMID: %s%lu%s", BLUE, BITS(ib, 0, 20), RST, BLUE, BITS(ib, 24, 28), RST);
 					decoder->pm4.next_ib_state.ib_size = BITS(ib, 0, 20) * 4;
 					decoder->pm4.next_ib_state.ib_vmid = decoder->next_ib_info.vmid ? decoder->next_ib_info.vmid : BITS(ib, 24, 28);
-					if (decoder->pm4.cur_opcode == 0x33) {
-						if (asic->family >= FAMILY_NV) {
-							printf(", CHAIN: %s%u%s, PRE_ENA: %s%u%s, CACHE_POLICY: %s%u%s, PRE_RESUME: %s%u%s PRIV: %s%u%s",
-								   BLUE, (unsigned)BITS(ib, 20, 21), RST,
-								   BLUE, (unsigned)BITS(ib, 21, 22), RST,
-								   BLUE, (unsigned)BITS(ib, 28, 30), RST,
-								   BLUE, (unsigned)BITS(ib, 30, 31), RST,
-								   BLUE, (unsigned)BITS(ib, 31, 32), RST);
-						} else if (asic->family >= FAMILY_AI) {
-							printf(", CHAIN: %s%u%s, OFFLOAD_POLLING: %s%u%s, VALID: %s%u%s, CACHE_POLICY: %s%u%s PRIV: %s%u%s",
-								   BLUE, (unsigned)BITS(ib, 20, 21), RST,
-								   BLUE, (unsigned)BITS(ib, 21, 22), RST,
-								   BLUE, (unsigned)BITS(ib, 23, 24), RST,
-								   BLUE, (unsigned)BITS(ib, 28, 30), RST,
-								   BLUE, (unsigned)BITS(ib, 31, 32), RST);
-						}
+					if (asic->family >= FAMILY_AI) {
+						printf(", CHAIN: %s%u%s, PRE_ENA: %s%u%s, CACHE_POLICY: %s%u%s, PRE_RESUME: %s%u%s PRIV: %s%u%s",
+							   BLUE, (unsigned)BITS(ib, 20, 21), RST,
+							   BLUE, (unsigned)BITS(ib, 21, 22), RST,
+							   BLUE, (unsigned)BITS(ib, 28, 30), RST,
+							   BLUE, (unsigned)BITS(ib, 30, 31), RST,
+							   BLUE, (unsigned)BITS(ib, 31, 32), RST);
 					}
 					if (!asic->options.no_follow_ib) {
 						if (umr_read_vram(asic, decoder->pm4.next_ib_state.ib_vmid,
Signature · 6 lines
2.20.1

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

Yup, my bad.  We also need to fix the streaming version (line 432 of src/lib/umr_pm4_decode_opcodes.c).  Would you like to incorporate this into this patch?  Otherwise I can do it separately.

Thanks,

Tom

Quoted 33 lines · Xiaojie Yuan

field names for INDIRECT_BUFFER_CONST/CIK of gfx9/gfx10 are the same. fields like OFFLOAD_POLLING and VALID are defined in mec's INDIRECT_BUFFER packet, so not applicable here.

---
  src/lib/ring_decode.c | 23 +++++++----------------
  1 file changed, 7 insertions(+), 16 deletions(-)
src/lib/ring_decode.c +0 -16
index 250dfd7..fa44f27 100644
@@ -617,22 +617,13 @@ static void print_decode_pm4_pkt3(struct umr_asic *asic, struct umr_ring_decoder
  				case 2: printf("IB_SIZE:%s%lu%s, VMID: %s%lu%s", BLUE, BITS(ib, 0, 20), RST, BLUE, BITS(ib, 24, 28), RST);
  					decoder->pm4.next_ib_state.ib_size = BITS(ib, 0, 20) * 4;
  					decoder->pm4.next_ib_state.ib_vmid = decoder->next_ib_info.vmid ? decoder->next_ib_info.vmid : BITS(ib, 24, 28);
-					if (decoder->pm4.cur_opcode == 0x33) {
-						if (asic->family >= FAMILY_NV) {
-							printf(", CHAIN: %s%u%s, PRE_ENA: %s%u%s, CACHE_POLICY: %s%u%s, PRE_RESUME: %s%u%s PRIV: %s%u%s",
-								   BLUE, (unsigned)BITS(ib, 20, 21), RST,
-								   BLUE, (unsigned)BITS(ib, 21, 22), RST,
-								   BLUE, (unsigned)BITS(ib, 28, 30), RST,
-								   BLUE, (unsigned)BITS(ib, 30, 31), RST,
-								   BLUE, (unsigned)BITS(ib, 31, 32), RST);
-						} else if (asic->family >= FAMILY_AI) {
-							printf(", CHAIN: %s%u%s, OFFLOAD_POLLING: %s%u%s, VALID: %s%u%s, CACHE_POLICY: %s%u%s PRIV: %s%u%s",
-								   BLUE, (unsigned)BITS(ib, 20, 21), RST,
-								   BLUE, (unsigned)BITS(ib, 21, 22), RST,
-								   BLUE, (unsigned)BITS(ib, 23, 24), RST,
-								   BLUE, (unsigned)BITS(ib, 28, 30), RST,
-								   BLUE, (unsigned)BITS(ib, 31, 32), RST);
-						}

src/lib/ring_decode.c static void print_decode_pm4_pkt3(struct umr_asic *asic, struct umr_ring_decoder · line 629

Quoted 10 lines
src/lib/ring_decode.c +7 -0
+					if (asic->family >= FAMILY_AI) {
+						printf(", CHAIN: %s%u%s, PRE_ENA: %s%u%s, CACHE_POLICY: %s%u%s, PRE_RESUME: %s%u%s PRIV: %s%u%s",
+							   BLUE, (unsigned)BITS(ib, 20, 21), RST,
+							   BLUE, (unsigned)BITS(ib, 21, 22), RST,
+							   BLUE, (unsigned)BITS(ib, 28, 30), RST,
+							   BLUE, (unsigned)BITS(ib, 30, 31), RST,
+							   BLUE, (unsigned)BITS(ib, 31, 32), RST);
  					}
  					if (!asic->options.no_follow_ib) {
  						if (umr_read_vram(asic, decoder->pm4.next_ib_state.ib_vmid,

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

#2 lore raw

[AMD Official Use Only - Internal Distribution Only]

Sure, I'll send v2 soon.

BR,
Xiaojie

________________________________________
From: StDenis, Tom <[email protected]>
Sent: Wednesday, February 19, 2020 7:51 PM
To: Yuan, Xiaojie; [email protected]
Subject: Re: [PATCH umr] fix field names for INDIRECT_BUFFER_CONST/CIK for gfx9/gfx10

Yup, my bad. We also need to fix the streaming version (line 432 of src/lib/umr_pm4_decode_opcodes.c). Would you like to incorporate this into this patch? Otherwise I can do it separately.

Thanks,

Tom

Quoted 33 lines · Xiaojie Yuan

field names for INDIRECT_BUFFER_CONST/CIK of gfx9/gfx10 are the same. fields like OFFLOAD_POLLING and VALID are defined in mec's INDIRECT_BUFFER packet, so not applicable here.

---
  src/lib/ring_decode.c | 23 +++++++----------------
  1 file changed, 7 insertions(+), 16 deletions(-)
src/lib/ring_decode.c +0 -16
index 250dfd7..fa44f27 100644
@@ -617,22 +617,13 @@ static void print_decode_pm4_pkt3(struct umr_asic *asic, struct umr_ring_decoder
                              case 2: printf("IB_SIZE:%s%lu%s, VMID: %s%lu%s", BLUE, BITS(ib, 0, 20), RST, BLUE, BITS(ib, 24, 28), RST);
                                      decoder->pm4.next_ib_state.ib_size = BITS(ib, 0, 20) * 4;
                                      decoder->pm4.next_ib_state.ib_vmid = decoder->next_ib_info.vmid ? decoder->next_ib_info.vmid : BITS(ib, 24, 28);
-                                     if (decoder->pm4.cur_opcode == 0x33) {
-                                             if (asic->family >= FAMILY_NV) {
-                                                     printf(", CHAIN: %s%u%s, PRE_ENA: %s%u%s, CACHE_POLICY: %s%u%s, PRE_RESUME: %s%u%s PRIV: %s%u%s",
-                                                                BLUE, (unsigned)BITS(ib, 20, 21), RST,
-                                                                BLUE, (unsigned)BITS(ib, 21, 22), RST,
-                                                                BLUE, (unsigned)BITS(ib, 28, 30), RST,
-                                                                BLUE, (unsigned)BITS(ib, 30, 31), RST,
-                                                                BLUE, (unsigned)BITS(ib, 31, 32), RST);
-                                             } else if (asic->family >= FAMILY_AI) {
-                                                     printf(", CHAIN: %s%u%s, OFFLOAD_POLLING: %s%u%s, VALID: %s%u%s, CACHE_POLICY: %s%u%s PRIV: %s%u%s",
-                                                                BLUE, (unsigned)BITS(ib, 20, 21), RST,
-                                                                BLUE, (unsigned)BITS(ib, 21, 22), RST,
-                                                                BLUE, (unsigned)BITS(ib, 23, 24), RST,
-                                                                BLUE, (unsigned)BITS(ib, 28, 30), RST,
-                                                                BLUE, (unsigned)BITS(ib, 31, 32), RST);
-                                             }

src/lib/ring_decode.c static void print_decode_pm4_pkt3(struct umr_asic *asic, struct umr_ring_decoder · line 629

Quoted 10 lines
src/lib/ring_decode.c +7 -0
+                                     if (asic->family >= FAMILY_AI) {
+                                             printf(", CHAIN: %s%u%s, PRE_ENA: %s%u%s, CACHE_POLICY: %s%u%s, PRE_RESUME: %s%u%s PRIV: %s%u%s",
+                                                        BLUE, (unsigned)BITS(ib, 20, 21), RST,
+                                                        BLUE, (unsigned)BITS(ib, 21, 22), RST,
+                                                        BLUE, (unsigned)BITS(ib, 28, 30), RST,
+                                                        BLUE, (unsigned)BITS(ib, 30, 31), RST,
+                                                        BLUE, (unsigned)BITS(ib, 31, 32), RST);
                                      }
                                      if (!asic->options.no_follow_ib) {
                                              if (umr_read_vram(asic, decoder->pm4.next_ib_state.ib_vmid,

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