* [PATCH v1] drm/amdgpu: implement workaround for sdma dcc corruption
@ 2026-09-24 12:43 Pierre-Eric Pelloux-Prayer
2026-09-24 12:55 ` Alex Deucher
2026-09-24 13:04 ` Christian König
0 siblings, 2 replies; 3+ messages in thread
From: Pierre-Eric Pelloux-Prayer @ 2026-09-24 12:43 UTC (permalink / raw)
To: Alex Deucher, Christian König, David Airlie, Simona Vetter,
Pierre-Eric Pelloux-Prayer
Cc: amd-gfx, dri-devel, linux-kernel
For unknown reasons, on gfx12 using multiple entities can causes
random corruption of BOs with DCC.
This workaround seems to prevent the issue until the root cause
is understood and fixed.
Link: https://gitlab.freedesktop.org/drm/amd/-/work_items/5663
Fixes: 3a6f6eeb3db5 ("drm/amdgpu: give ttm entities access to all the sdma scheds")
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 3d620ec2937f..a826e091ea58 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -2392,6 +2392,11 @@ void amdgpu_ttm_enable_buffer_funcs(struct amdgpu_device *adev)
num_clear_entities = MIN(adev->mman.num_buffer_funcs_scheds, TTM_NUM_MOVE_FENCES);
num_move_entities = MIN(adev->mman.num_buffer_funcs_scheds, TTM_NUM_MOVE_FENCES);
+ /* TODO: workaround for DCC corruption when moving BOs from multiple queues at
+ * the same time: use a single queue until the root cause is identified and fixed.
+ */
+ if (IP_VERSION_MAJ(amdgpu_ip_version(adev, SDMA0_HWIP, 0)) == 7)
+ num_move_entities = 1;
adev->mman.clear_entities = kcalloc(num_clear_entities,
sizeof(struct amdgpu_ttm_buffer_entity),
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v1] drm/amdgpu: implement workaround for sdma dcc corruption
2026-09-24 12:43 [PATCH v1] drm/amdgpu: implement workaround for sdma dcc corruption Pierre-Eric Pelloux-Prayer
@ 2026-09-24 12:55 ` Alex Deucher
2026-09-24 13:04 ` Christian König
1 sibling, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2026-09-24 12:55 UTC (permalink / raw)
To: Pierre-Eric Pelloux-Prayer
Cc: Alex Deucher, Christian König, David Airlie, Simona Vetter,
amd-gfx, dri-devel, linux-kernel
On Thu, Sep 24, 2026 at 8:44 AM Pierre-Eric Pelloux-Prayer
<pierre-eric.pelloux-prayer@amd.com> wrote:
>
> For unknown reasons, on gfx12 using multiple entities can causes
> random corruption of BOs with DCC.
> This workaround seems to prevent the issue until the root cause
> is understood and fixed.
>
> Link: https://gitlab.freedesktop.org/drm/amd/-/work_items/5663
> Fixes: 3a6f6eeb3db5 ("drm/amdgpu: give ttm entities access to all the sdma scheds")
> Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index 3d620ec2937f..a826e091ea58 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -2392,6 +2392,11 @@ void amdgpu_ttm_enable_buffer_funcs(struct amdgpu_device *adev)
>
> num_clear_entities = MIN(adev->mman.num_buffer_funcs_scheds, TTM_NUM_MOVE_FENCES);
> num_move_entities = MIN(adev->mman.num_buffer_funcs_scheds, TTM_NUM_MOVE_FENCES);
> + /* TODO: workaround for DCC corruption when moving BOs from multiple queues at
> + * the same time: use a single queue until the root cause is identified and fixed.
> + */
> + if (IP_VERSION_MAJ(amdgpu_ip_version(adev, SDMA0_HWIP, 0)) == 7)
Probably just limit this to 7.0.0 and 7.0.1. sdma 7.1 doesn't have
DCC. WIth that fixed:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Alex
> + num_move_entities = 1;
>
> adev->mman.clear_entities = kcalloc(num_clear_entities,
> sizeof(struct amdgpu_ttm_buffer_entity),
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v1] drm/amdgpu: implement workaround for sdma dcc corruption
2026-09-24 12:43 [PATCH v1] drm/amdgpu: implement workaround for sdma dcc corruption Pierre-Eric Pelloux-Prayer
2026-09-24 12:55 ` Alex Deucher
@ 2026-09-24 13:04 ` Christian König
1 sibling, 0 replies; 3+ messages in thread
From: Christian König @ 2026-09-24 13:04 UTC (permalink / raw)
To: Pierre-Eric Pelloux-Prayer, Alex Deucher, David Airlie, Simona Vetter
Cc: amd-gfx, dri-devel, linux-kernel
On 9/24/26 14:43, Pierre-Eric Pelloux-Prayer wrote:
> For unknown reasons, on gfx12 using multiple entities can causes
> random corruption of BOs with DCC.
> This workaround seems to prevent the issue until the root cause
> is understood and fixed.
>
> Link: https://gitlab.freedesktop.org/drm/amd/-/work_items/5663
> Fixes: 3a6f6eeb3db5 ("drm/amdgpu: give ttm entities access to all the sdma scheds")
> Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index 3d620ec2937f..a826e091ea58 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -2392,6 +2392,11 @@ void amdgpu_ttm_enable_buffer_funcs(struct amdgpu_device *adev)
>
> num_clear_entities = MIN(adev->mman.num_buffer_funcs_scheds, TTM_NUM_MOVE_FENCES);
> num_move_entities = MIN(adev->mman.num_buffer_funcs_scheds, TTM_NUM_MOVE_FENCES);
> + /* TODO: workaround for DCC corruption when moving BOs from multiple queues at
> + * the same time: use a single queue until the root cause is identified and fixed.
> + */
> + if (IP_VERSION_MAJ(amdgpu_ip_version(adev, SDMA0_HWIP, 0)) == 7)
Thinking it through it would be nice if we could check for that DCC HW generation instead of the SDMA version.
But we need a fix ASAP so the patch is Reviewed-by: Christian König <christian.koenig@amd.com>.
Regards,
Christian.
> + num_move_entities = 1;
>
> adev->mman.clear_entities = kcalloc(num_clear_entities,
> sizeof(struct amdgpu_ttm_buffer_entity),
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-24 13:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-24 12:43 [PATCH v1] drm/amdgpu: implement workaround for sdma dcc corruption Pierre-Eric Pelloux-Prayer
2026-09-24 12:55 ` Alex Deucher
2026-09-24 13:04 ` Christian König
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®