This is a note to let you know that I've just added the patch titled drm/amdgpu/sdma4: set align mask to 255 to the 6.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: drm-amdgpu-sdma4-set-align-mask-to-255.patch and it can be found in the queue-6.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From stable-owner@xxxxxxxxxxxxxxx Fri Jul 7 17:08:18 2023 From: Alex Deucher <alexander.deucher@xxxxxxx> Date: Fri, 7 Jul 2023 11:07:30 -0400 Subject: drm/amdgpu/sdma4: set align mask to 255 To: <stable@xxxxxxxxxxxxxxx> Cc: mario.limonciello@xxxxxxx, "Alex Deucher" <alexander.deucher@xxxxxxx>, "Felix Kuehling" <Felix.Kuehling@xxxxxxx>, "Aaron Liu" <aaron.liu@xxxxxxx>, "Christian König" <christian.koenig@xxxxxxx> Message-ID: <20230707150734.746135-5-alexander.deucher@xxxxxxx> From: Alex Deucher <alexander.deucher@xxxxxxx> commit e5df16d9428f5c6d2d0b1eff244d6c330ba9ef3a upstream 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@xxxxxxx> Reviewed-by: Aaron Liu <aaron.liu@xxxxxxx> Reviewed-by: Christian König <christian.koenig@xxxxxxx> Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx> Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) --- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c @@ -2306,7 +2306,7 @@ const struct amd_ip_funcs sdma_v4_0_ip_f static const struct amdgpu_ring_funcs sdma_v4_0_ring_funcs = { .type = AMDGPU_RING_TYPE_SDMA, - .align_mask = 0xf, + .align_mask = 0xff, .nop = SDMA_PKT_NOP_HEADER_OP(SDMA_OP_NOP), .support_64bit_ptrs = true, .secure_submission_supported = true, @@ -2338,7 +2338,7 @@ static const struct amdgpu_ring_funcs sd static const struct amdgpu_ring_funcs sdma_v4_0_page_ring_funcs = { .type = AMDGPU_RING_TYPE_SDMA, - .align_mask = 0xf, + .align_mask = 0xff, .nop = SDMA_PKT_NOP_HEADER_OP(SDMA_OP_NOP), .support_64bit_ptrs = true, .secure_submission_supported = true, --- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c @@ -1740,7 +1740,7 @@ const struct amd_ip_funcs sdma_v4_4_2_ip static const struct amdgpu_ring_funcs sdma_v4_4_2_ring_funcs = { .type = AMDGPU_RING_TYPE_SDMA, - .align_mask = 0xf, + .align_mask = 0xff, .nop = SDMA_PKT_NOP_HEADER_OP(SDMA_OP_NOP), .support_64bit_ptrs = true, .get_rptr = sdma_v4_4_2_ring_get_rptr, @@ -1771,7 +1771,7 @@ static const struct amdgpu_ring_funcs sd static const struct amdgpu_ring_funcs sdma_v4_4_2_page_ring_funcs = { .type = AMDGPU_RING_TYPE_SDMA, - .align_mask = 0xf, + .align_mask = 0xff, .nop = SDMA_PKT_NOP_HEADER_OP(SDMA_OP_NOP), .support_64bit_ptrs = true, .get_rptr = sdma_v4_4_2_ring_get_rptr, Patches currently in stable-queue which might be from stable-owner@xxxxxxxxxxxxxxx are queue-6.4/drm-amd-pm-revise-the-aspm-settings-for-thunderbolt-attached-scenario.patch queue-6.4/drm-amdgpu-make-sure-that-bos-have-a-backing-store.patch queue-6.4/drm-amd-pm-add-abnormal-fan-detection-for-smu-13.0.0.patch queue-6.4/drm-amdgpu-check-ras-irq-existence-for-vcn-jpeg.patch queue-6.4/drm-amdgpu-sdma4-set-align-mask-to-255.patch queue-6.4/drm-amdgpu-make-sure-bos-are-locked-in-amdgpu_vm_get_memory.patch queue-6.4/drm-amdgpu-skip-mark-offset-for-high-priority-rings.patch