[PATCH] drm/amdgpu/sdma: don't actually disable any SDMA rings via debugfs
Alex Deucher
alexander.deucher at amd.com
Tue Jul 1 15:25:38 UTC 2025
We can disable various queues via debugfs for IGT testing, but in
doing so, we race with the kernel for VM updates or buffer moves.
Fixes: d2e3961ae371 ("drm/amdgpu: add amdgpu_sdma_sched_mask debugfs")
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c | 25 ++++--------------------
1 file changed, 4 insertions(+), 21 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
index 8b8a04138711c..4f98d4920f5cf 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
@@ -350,9 +350,8 @@ int amdgpu_sdma_ras_sw_init(struct amdgpu_device *adev)
static int amdgpu_debugfs_sdma_sched_mask_set(void *data, u64 val)
{
struct amdgpu_device *adev = (struct amdgpu_device *)data;
- u64 i, num_ring;
+ u64 num_ring;
u64 mask = 0;
- struct amdgpu_ring *ring, *page = NULL;
if (!adev)
return -ENODEV;
@@ -372,25 +371,9 @@ static int amdgpu_debugfs_sdma_sched_mask_set(void *data, u64 val)
if ((val & mask) == 0)
return -EINVAL;
-
- for (i = 0; i < adev->sdma.num_instances; ++i) {
- ring = &adev->sdma.instance[i].ring;
- if (adev->sdma.has_page_queue)
- page = &adev->sdma.instance[i].page;
- if (val & BIT_ULL(i * num_ring))
- ring->sched.ready = true;
- else
- ring->sched.ready = false;
-
- if (page) {
- if (val & BIT_ULL(i * num_ring + 1))
- page->sched.ready = true;
- else
- page->sched.ready = false;
- }
- }
- /* publish sched.ready flag update effective immediately across smp */
- smp_rmb();
+ /* Just return success here. We can't disable any rings otherwise
+ * we race with vm udpates or buffer ops.
+ */
return 0;
}
--
2.50.0
More information about the amd-gfx
mailing list