All of lore.kernel.org
 help / color / mirror / Atom feed
From: "StDenis, Tom" <Tom.StDenis@amd.com>
To: "Yuan, Xiaojie" <Xiaojie.Yuan@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH UMR] Fix off-by-one error for decoding sdma linear write packet
Date: Tue, 14 Jul 2020 17:36:01 +0000	[thread overview]
Message-ID: <DM6PR12MB354778F6611AFA0547CDF295F7610@DM6PR12MB3547.namprd12.prod.outlook.com> (raw)
In-Reply-To: <MW2PR12MB2586140707DD884C1FE54E5B89610@MW2PR12MB2586.namprd12.prod.outlook.com>

[AMD Official Use Only - Internal Distribution Only]

Applied and pushed out to master.

Thanks!

Tom

________________________________________
From: Yuan, Xiaojie <Xiaojie.Yuan@amd.com>
Sent: Tuesday, July 14, 2020 11:35
To: StDenis, Tom; amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH UMR] Fix off-by-one error for decoding sdma linear write packet

[AMD Official Use Only - Internal Distribution Only]

Sure Tom, here it is.

BR,
Xiaojie

________________________________________
From: StDenis, Tom <Tom.StDenis@amd.com>
Sent: Tuesday, July 14, 2020 10:11 PM
To: Yuan, Xiaojie; amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH UMR] Fix off-by-one error for decoding sdma linear write packet

[AMD Official Use Only - Internal Distribution Only]

Thanks, can you attach the patch to your email instead though so it applies cleanly?

Cheers,
Tom

________________________________________
From: Yuan, Xiaojie <Xiaojie.Yuan@amd.com>
Sent: Tuesday, July 14, 2020 00:18
To: amd-gfx@lists.freedesktop.org; StDenis, Tom
Cc: Yuan, Xiaojie
Subject: [PATCH UMR] Fix off-by-one error for decoding sdma linear write packet

COUNT in linear write packet represents dword number - 1

Before fix:
navi10.sdma0.ring[   0] == 0x00000002    .w. OPCODE: [WRITE], SUB-OPCODE: [0], LINEAR_WRITE
navi10.sdma0.ring[   1] == 0x00400a60    ... |---+ WORD [1]: DST_ADDR_LO: 0x00400a60
navi10.sdma0.ring[   2] == 0x00000000    ... |---+ WORD [2]: DST_ADDR_HI: 0x00000000
navi10.sdma0.ring[   3] == 0x00000000    ... |---+ WORD [3]: COUNT: 0x00000000
navi10.sdma0.ring[   4] == 0xdeadbeef    ...

After fix:
navi10.sdma0.ring[   0] == 0x00000002    .w. OPCODE: [WRITE], SUB-OPCODE: [0], LINEAR_WRITE
navi10.sdma0.ring[   1] == 0x00400a60    ... |---+ WORD [1]: DST_ADDR_LOa: 0x00400a60
navi10.sdma0.ring[   2] == 0x00000000    ... |---+ WORD [2]: DST_ADDR_HIb: 0x00000000
navi10.sdma0.ring[   3] == 0x00000000    ... |---+ WORD [3]: COUNTc: 0x00000000
navi10.sdma0.ring[   4] == 0xdeadbeef    ... \---+ WORD [4]: DATA: 0xdeadbeef

Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com>
---
 src/lib/ring_decode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ring_decode.c b/src/lib/ring_decode.c
index c3b5d18..a74229d 100644
--- a/src/lib/ring_decode.c
+++ b/src/lib/ring_decode.c
@@ -1819,7 +1819,7 @@ static void parse_next_sdma_pkt(struct umr_asic *asic, struct umr_ring_decoder *
                                                case 2: printf("DST_ADDR_HI: %s0x%08lx%s", YELLOW, (unsigned long)ib, RST);
                                                        break;
                                                case 3: printf("COUNT: %s0x%08lx%s", BLUE, (unsigned long)ib, RST);
-                                                       decoder->sdma.n_words += ib - 1;
+                                                       decoder->sdma.n_words += ib;
                                                        break;
                                                default: printf("DATA: %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

      reply	other threads:[~2020-07-14 17:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-14  4:18 [PATCH UMR] Fix off-by-one error for decoding sdma linear write packet Xiaojie Yuan
2020-07-14 14:11 ` StDenis, Tom
2020-07-14 15:35   ` Yuan, Xiaojie
2020-07-14 17:36     ` StDenis, Tom [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR12MB354778F6611AFA0547CDF295F7610@DM6PR12MB3547.namprd12.prod.outlook.com \
    --to=tom.stdenis@amd.com \
    --cc=Xiaojie.Yuan@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.