* [PATCH umr] Fix register name lookup for sdma POLL_REGMEM packet
@ 2020-09-22 3:02 Xiaojie Yuan
2020-09-22 13:12 ` StDenis, Tom
0 siblings, 1 reply; 2+ messages in thread
From: Xiaojie Yuan @ 2020-09-22 3:02 UTC (permalink / raw)
To: amd-gfx, tom.stdenis; +Cc: Xiaojie Yuan
POLL_REGMEM_ADDR_LO/HI are in byte but umr_reg_name() expects register address in dword
Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com>
---
src/lib/ring_decode.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lib/ring_decode.c b/src/lib/ring_decode.c
index a74229d..b5838d1 100644
--- a/src/lib/ring_decode.c
+++ b/src/lib/ring_decode.c
@@ -1904,10 +1904,10 @@ static void parse_next_sdma_pkt(struct umr_asic *asic, struct umr_ring_decoder *
case 0: // WAIT_REG_MEM
switch (decoder->sdma.cur_word) {
case 1: printf("POLL_REGMEM_ADDR_LO: %s0x%08lx%s", YELLOW, (unsigned long)ib, RST);
- if (!(decoder->sdma.header_dw & (1UL << 31))) printf("(%s)", umr_reg_name(asic, ib));
+ if (!(decoder->sdma.header_dw & (1UL << 31))) printf("(%s)", umr_reg_name(asic, ib >> 2));
break;
case 2: printf("POLL_REGMEM_ADDR_HI: %s0x%08lx%s", YELLOW, (unsigned long)ib, RST);
- if (!(decoder->sdma.header_dw & (1UL << 31))) printf("(%s)", umr_reg_name(asic, ib));
+ if (!(decoder->sdma.header_dw & (1UL << 31))) printf("(%s)", umr_reg_name(asic, ib >> 2));
break;
case 3: printf("POLL_REGMEM_ADDR_VALUE: %s0x%08lx%s", BLUE, (unsigned long)ib, RST);
break;
--
2.20.1
_______________________________________________
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
* Re: [PATCH umr] Fix register name lookup for sdma POLL_REGMEM packet
2020-09-22 3:02 [PATCH umr] Fix register name lookup for sdma POLL_REGMEM packet Xiaojie Yuan
@ 2020-09-22 13:12 ` StDenis, Tom
0 siblings, 0 replies; 2+ messages in thread
From: StDenis, Tom @ 2020-09-22 13:12 UTC (permalink / raw)
To: Yuan, Xiaojie, amd-gfx
[AMD Official Use Only - Internal Distribution Only]
Hi Xiaojie,
I've pushed your patch out to main. In reviewing the SDMA opcode I actually noticed a couple of other minor things to fix up so I've pushed that out too.
Cheers,
Tom
________________________________________
From: Yuan, Xiaojie <Xiaojie.Yuan@amd.com>
Sent: Monday, September 21, 2020 23:02
To: amd-gfx@lists.freedesktop.org; StDenis, Tom
Cc: Yuan, Xiaojie
Subject: [PATCH umr] Fix register name lookup for sdma POLL_REGMEM packet
POLL_REGMEM_ADDR_LO/HI are in byte but umr_reg_name() expects register address in dword
Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com>
---
src/lib/ring_decode.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lib/ring_decode.c b/src/lib/ring_decode.c
index a74229d..b5838d1 100644
--- a/src/lib/ring_decode.c
+++ b/src/lib/ring_decode.c
@@ -1904,10 +1904,10 @@ static void parse_next_sdma_pkt(struct umr_asic *asic, struct umr_ring_decoder *
case 0: // WAIT_REG_MEM
switch (decoder->sdma.cur_word) {
case 1: printf("POLL_REGMEM_ADDR_LO: %s0x%08lx%s", YELLOW, (unsigned long)ib, RST);
- if (!(decoder->sdma.header_dw & (1UL << 31))) printf("(%s)", umr_reg_name(asic, ib));
+ if (!(decoder->sdma.header_dw & (1UL << 31))) printf("(%s)", umr_reg_name(asic, ib >> 2));
break;
case 2: printf("POLL_REGMEM_ADDR_HI: %s0x%08lx%s", YELLOW, (unsigned long)ib, RST);
- if (!(decoder->sdma.header_dw & (1UL << 31))) printf("(%s)", umr_reg_name(asic, ib));
+ if (!(decoder->sdma.header_dw & (1UL << 31))) printf("(%s)", umr_reg_name(asic, ib >> 2));
break;
case 3: printf("POLL_REGMEM_ADDR_VALUE: %s0x%08lx%s", BLUE, (unsigned long)ib, RST);
break;
--
2.20.1
_______________________________________________
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:[~2020-09-22 13:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-22 3:02 [PATCH umr] Fix register name lookup for sdma POLL_REGMEM packet Xiaojie Yuan
2020-09-22 13:12 ` StDenis, Tom
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).