* [PATCH UMR] Fix off-by-one error for decoding sdma linear write packet
@ 2020-07-14 4:18 Xiaojie Yuan
2020-07-14 14:11 ` StDenis, Tom
0 siblings, 1 reply; 4+ messages in thread
From: Xiaojie Yuan @ 2020-07-14 4:18 UTC (permalink / raw)
To: amd-gfx, tom.stdenis; +Cc: Xiaojie Yuan
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH UMR] Fix off-by-one error for decoding sdma linear write packet
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
0 siblings, 1 reply; 4+ messages in thread
From: StDenis, Tom @ 2020-07-14 14:11 UTC (permalink / raw)
To: Yuan, Xiaojie, amd-gfx
[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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH UMR] Fix off-by-one error for decoding sdma linear write packet
2020-07-14 14:11 ` StDenis, Tom
@ 2020-07-14 15:35 ` Yuan, Xiaojie
2020-07-14 17:36 ` StDenis, Tom
0 siblings, 1 reply; 4+ messages in thread
From: Yuan, Xiaojie @ 2020-07-14 15:35 UTC (permalink / raw)
To: StDenis, Tom, amd-gfx
[-- Attachment #1: Type: text/plain, Size: 2829 bytes --]
[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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-off-by-one-error-for-decoding-sdma-linear-write-.patch --]
[-- Type: text/x-patch; name="0001-Fix-off-by-one-error-for-decoding-sdma-linear-write-.patch", Size: 1865 bytes --]
From 269c5dba567553ad88ae96d1d3b098c3c331cf35 Mon Sep 17 00:00:00 2001
From: Xiaojie Yuan <xiaojie.yuan@amd.com>
Date: Tue, 14 Jul 2020 12:13:04 +0800
Subject: [PATCH] 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_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 ... \---+ 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
[-- Attachment #3: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH UMR] Fix off-by-one error for decoding sdma linear write packet
2020-07-14 15:35 ` Yuan, Xiaojie
@ 2020-07-14 17:36 ` StDenis, Tom
0 siblings, 0 replies; 4+ messages in thread
From: StDenis, Tom @ 2020-07-14 17:36 UTC (permalink / raw)
To: Yuan, Xiaojie, amd-gfx
[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
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-07-14 17:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.