Skip to content

Commit e5df16d

Browse files
committed
drm/amdgpu/sdma4: set align mask to 255
The wptr needs to be incremented at at least 64 dword intervals, use 256 to align with windows. This should fix potential hangs with unaligned updates. Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Aaron Liu <aaron.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 740f42a commit e5df16d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2312,7 +2312,7 @@ const struct amd_ip_funcs sdma_v4_0_ip_funcs = {
23122312

23132313
static const struct amdgpu_ring_funcs sdma_v4_0_ring_funcs = {
23142314
.type = AMDGPU_RING_TYPE_SDMA,
2315-
.align_mask = 0xf,
2315+
.align_mask = 0xff,
23162316
.nop = SDMA_PKT_NOP_HEADER_OP(SDMA_OP_NOP),
23172317
.support_64bit_ptrs = true,
23182318
.secure_submission_supported = true,
@@ -2344,7 +2344,7 @@ static const struct amdgpu_ring_funcs sdma_v4_0_ring_funcs = {
23442344

23452345
static const struct amdgpu_ring_funcs sdma_v4_0_page_ring_funcs = {
23462346
.type = AMDGPU_RING_TYPE_SDMA,
2347-
.align_mask = 0xf,
2347+
.align_mask = 0xff,
23482348
.nop = SDMA_PKT_NOP_HEADER_OP(SDMA_OP_NOP),
23492349
.support_64bit_ptrs = true,
23502350
.secure_submission_supported = true,

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1825,7 +1825,7 @@ const struct amd_ip_funcs sdma_v4_4_2_ip_funcs = {
18251825

18261826
static const struct amdgpu_ring_funcs sdma_v4_4_2_ring_funcs = {
18271827
.type = AMDGPU_RING_TYPE_SDMA,
1828-
.align_mask = 0xf,
1828+
.align_mask = 0xff,
18291829
.nop = SDMA_PKT_NOP_HEADER_OP(SDMA_OP_NOP),
18301830
.support_64bit_ptrs = true,
18311831
.get_rptr = sdma_v4_4_2_ring_get_rptr,
@@ -1856,7 +1856,7 @@ static const struct amdgpu_ring_funcs sdma_v4_4_2_ring_funcs = {
18561856

18571857
static const struct amdgpu_ring_funcs sdma_v4_4_2_page_ring_funcs = {
18581858
.type = AMDGPU_RING_TYPE_SDMA,
1859-
.align_mask = 0xf,
1859+
.align_mask = 0xff,
18601860
.nop = SDMA_PKT_NOP_HEADER_OP(SDMA_OP_NOP),
18611861
.support_64bit_ptrs = true,
18621862
.get_rptr = sdma_v4_4_2_ring_get_rptr,

0 commit comments

Comments
 (0)