Skip to contentSkip to conversation

drm/amdgpu: fix vm pte pde flags to 64-bit for sdma v4

PATCH Superseded Junwei Zhang 3 participants 4 messages Mar 28, 2017 – Mar 29, 2017 2 messages not in the archive

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: fix vm pte pde flags to 64-bit for sdma v4

---
 drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +2 -2
index dcbef50..6cfb100 100644
@@ -968,8 +968,8 @@ static void sdma_v4_0_vm_set_pte_pde(struct amdgpu_ib *ib,
 	ib->ptr[ib->length_dw++] = SDMA_PKT_HEADER_OP(SDMA_OP_PTEPDE);
 	ib->ptr[ib->length_dw++] = lower_32_bits(pe); /* dst addr */
 	ib->ptr[ib->length_dw++] = upper_32_bits(pe);
-	ib->ptr[ib->length_dw++] = flags; /* mask */
-	ib->ptr[ib->length_dw++] = 0;
+	ib->ptr[ib->length_dw++] = lower_32_bits(flags); /* mask */
+	ib->ptr[ib->length_dw++] = upper_32_bits(flags);
 	ib->ptr[ib->length_dw++] = lower_32_bits(addr); /* value */
 	ib->ptr[ib->length_dw++] = upper_32_bits(addr);
 	ib->ptr[ib->length_dw++] = incr; /* increment size */
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1490691347-29590-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Am 28.03.2017 um 10:55 schrieb Junwei Zhang:

Quoted 1 line

Good catch, patch is Reviewed-by: Christian König <[email protected]>.

It doesn't matter for older versions because they don't have flags in the high bits, but just for completeness could you fix this for them as well?

Thanks,
Christian.

Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +0 -0
index dcbef50..6cfb100 100644

drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c static void sdma_v4_0_vm_set_pte_pde(struct amdgpu_ib *ib, · line 975

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +2 -2
@@ -968,8 +968,8 @@ static void sdma_v4_0_vm_set_pte_pde(struct amdgpu_ib *ib,
  	ib->ptr[ib->length_dw++] = SDMA_PKT_HEADER_OP(SDMA_OP_PTEPDE);
  	ib->ptr[ib->length_dw++] = lower_32_bits(pe); /* dst addr */
  	ib->ptr[ib->length_dw++] = upper_32_bits(pe);
-	ib->ptr[ib->length_dw++] = flags; /* mask */
-	ib->ptr[ib->length_dw++] = 0;
+	ib->ptr[ib->length_dw++] = lower_32_bits(flags); /* mask */
+	ib->ptr[ib->length_dw++] = upper_32_bits(flags);
  	ib->ptr[ib->length_dw++] = lower_32_bits(addr); /* value */
  	ib->ptr[ib->length_dw++] = upper_32_bits(addr);
  	ib->ptr[ib->length_dw++] = incr; /* increment size */

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 0a8d9c5c-5ee5-7c86-be40-9c0fa4bc1a8a-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org

#4 lore raw
Quoted 7 lines · Christian König

Am 28.03.2017 um 10:55 schrieb Junwei Zhang:

Quoted 1 line

Good catch, patch is Reviewed-by: Christian König <[email protected]>.

It doesn't matter for older versions because they don't have flags in the high bits, but just for completeness could you fix this for them as well?

Yeah, just focused on Vega10 yesterday, neglecting others. please check it in another mail.

Jerry

Quoted 8 lines

Thanks,
Christian.

Quoted 4 lines
---
  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 18 lines
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +0 -0
index dcbef50..6cfb100 100644

drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c static void sdma_v4_0_vm_set_pte_pde(struct amdgpu_ib *ib, · line 975

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +2 -2
@@ -968,8 +968,8 @@ static void sdma_v4_0_vm_set_pte_pde(struct amdgpu_ib *ib,
      ib->ptr[ib->length_dw++] = SDMA_PKT_HEADER_OP(SDMA_OP_PTEPDE);
      ib->ptr[ib->length_dw++] = lower_32_bits(pe); /* dst addr */
      ib->ptr[ib->length_dw++] = upper_32_bits(pe);
-    ib->ptr[ib->length_dw++] = flags; /* mask */
-    ib->ptr[ib->length_dw++] = 0;
+    ib->ptr[ib->length_dw++] = lower_32_bits(flags); /* mask */
+    ib->ptr[ib->length_dw++] = upper_32_bits(flags);
      ib->ptr[ib->length_dw++] = lower_32_bits(addr); /* value */
      ib->ptr[ib->length_dw++] = upper_32_bits(addr);
      ib->ptr[ib->length_dw++] = incr; /* increment size */

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by Alex Deucher
#5 lore raw
In reply to a message not in the archive
Quoted 9 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Junwei Zhang
Sent: Tuesday, March 28, 2017 4:56 AM
To: [email protected]
Cc: Zhang, Jerry
Subject: [PATCH] drm/amdgpu: fix vm pte pde flags to 64-bit for sdma v4

Quoted 25 lines
---
 drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +2 -2
index dcbef50..6cfb100 100644
@@ -968,8 +968,8 @@ static void sdma_v4_0_vm_set_pte_pde(struct
 amdgpu_ib *ib,
 	ib->ptr[ib->length_dw++] =
 SDMA_PKT_HEADER_OP(SDMA_OP_PTEPDE);
 	ib->ptr[ib->length_dw++] = lower_32_bits(pe); /* dst addr */
 	ib->ptr[ib->length_dw++] = upper_32_bits(pe);
-	ib->ptr[ib->length_dw++] = flags; /* mask */
-	ib->ptr[ib->length_dw++] = 0;
+	ib->ptr[ib->length_dw++] = lower_32_bits(flags); /* mask */
+	ib->ptr[ib->length_dw++] = upper_32_bits(flags);
 	ib->ptr[ib->length_dw++] = lower_32_bits(addr); /* value */
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +0 -1
 	ib->ptr[ib->length_dw++] = upper_32_bits(addr);
 	ib->ptr[ib->length_dw++] = incr; /* increment size */
--

1.9.1

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx