Skip to content

Commit 3cb576b

Browse files
frank98753alexdeucher
authored andcommitted
drm/amdgpu: fix PTE copy corruption for sdma 7
Without setting dcc bit, there is ramdon PTE copy corruption on sdma 7. so add this bit and update the packet format accordingly. Acked-by: Alex Deucher <[email protected]> Signed-off-by: Frank Min <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] # 6.11.x
1 parent d52ac79 commit 3cb576b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,13 +1080,16 @@ static void sdma_v7_0_vm_copy_pte(struct amdgpu_ib *ib,
10801080
unsigned bytes = count * 8;
10811081

10821082
ib->ptr[ib->length_dw++] = SDMA_PKT_COPY_LINEAR_HEADER_OP(SDMA_OP_COPY) |
1083-
SDMA_PKT_COPY_LINEAR_HEADER_SUB_OP(SDMA_SUBOP_COPY_LINEAR);
1083+
SDMA_PKT_COPY_LINEAR_HEADER_SUB_OP(SDMA_SUBOP_COPY_LINEAR) |
1084+
SDMA_PKT_COPY_LINEAR_HEADER_CPV(1);
1085+
10841086
ib->ptr[ib->length_dw++] = bytes - 1;
10851087
ib->ptr[ib->length_dw++] = 0; /* src/dst endian swap */
10861088
ib->ptr[ib->length_dw++] = lower_32_bits(src);
10871089
ib->ptr[ib->length_dw++] = upper_32_bits(src);
10881090
ib->ptr[ib->length_dw++] = lower_32_bits(pe);
10891091
ib->ptr[ib->length_dw++] = upper_32_bits(pe);
1092+
ib->ptr[ib->length_dw++] = 0;
10901093

10911094
}
10921095

@@ -1744,7 +1747,7 @@ static void sdma_v7_0_set_buffer_funcs(struct amdgpu_device *adev)
17441747
}
17451748

17461749
static const struct amdgpu_vm_pte_funcs sdma_v7_0_vm_pte_funcs = {
1747-
.copy_pte_num_dw = 7,
1750+
.copy_pte_num_dw = 8,
17481751
.copy_pte = sdma_v7_0_vm_copy_pte,
17491752
.write_pte = sdma_v7_0_vm_write_pte,
17501753
.set_pte_pde = sdma_v7_0_vm_set_pte_pde,

0 commit comments

Comments
 (0)