Fix register name lookup for sdma POLL_REGMEM packet
PATCH 1/1 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
--- src/lib/ring_decode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
src/lib/ring_decode.c +2 -2
@@ -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 ;
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/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 <[email protected]>
Sent: Monday, September 21, 2020 23:02
To: [email protected]; 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
--- src/lib/ring_decode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
src/lib/ring_decode.c +2 -2
@@ -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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx