public inbox for amd-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH umr] Fix VMID of chained IBs
@ 2018-04-10 15:23 Tom St Denis
       [not found] ` <20180410152349.2716-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Tom St Denis @ 2018-04-10 15:23 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Tom St Denis

We were using the VMID field literally when inside an IB it's inherited instead

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
---
 src/lib/dump_ib.c     | 8 ++++----
 src/lib/ring_decode.c | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/lib/dump_ib.c b/src/lib/dump_ib.c
index 74a3241c309e..cbf859e3633b 100644
--- a/src/lib/dump_ib.c
+++ b/src/lib/dump_ib.c
@@ -39,10 +39,10 @@ void umr_dump_ib(struct umr_asic *asic, struct umr_ring_decoder *decoder)
 	if (decoder->src.ib_addr == 0)
 		printf("ring[%s%u%s]", BLUE, (unsigned)decoder->src.addr, RST);
 	else
-		printf("IB[%s%u%s] at %s%d%s@%s0x%llx%s",
-			BLUE, (unsigned)decoder->src.addr, RST,
-			YELLOW, (int)decoder->src.vmid, RST,
-			YELLOW, (unsigned long long)decoder->src.ib_addr, RST);
+		printf("IB[%s%u%s@%s0x%llx%s + %s0x%x%s]",
+			BLUE, (int)decoder->src.vmid, RST,
+			YELLOW, (unsigned long long)decoder->src.ib_addr, RST,
+			YELLOW, (unsigned)decoder->src.addr * 4, RST);
 
 	printf("\n");
 
diff --git a/src/lib/ring_decode.c b/src/lib/ring_decode.c
index c1d6bcb98bae..42265e0a74c9 100644
--- a/src/lib/ring_decode.c
+++ b/src/lib/ring_decode.c
@@ -540,7 +540,7 @@ static void print_decode_pm4_pkt3(struct umr_asic *asic, struct umr_ring_decoder
 					break;
 				case 2: printf("IB_SIZE:%s%lu%s, VMID: %s%lu%s", BLUE, BITS(ib, 0, 20), RST, BLUE, BITS(ib, 24, 32), RST);
 					decoder->pm4.next_ib_state.ib_size = BITS(ib, 0, 20) * 4;
-					decoder->pm4.next_ib_state.ib_vmid = BITS(ib, 24, 32);
+					decoder->pm4.next_ib_state.ib_vmid = decoder->next_ib_info.vmid ? decoder->next_ib_info.vmid : BITS(ib, 24, 32);
 					add_ib_pm4(decoder);
 					break;
 				default: printf("Invalid word for opcode 0x%02lx", (unsigned long)decoder->pm4.cur_opcode);
-- 
2.14.3

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-04-10 15:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-10 15:23 [PATCH umr] Fix VMID of chained IBs Tom St Denis
     [not found] ` <20180410152349.2716-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
2018-04-10 15:29   ` Christian König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox