amdgpu_test_ring_helper will set sched.ready unconditionally based on ring test result, this will lead value mismatch between ring->sched.ready and no_scheduler for those rings without a kernel scheluer, after they perform ring test. This will be confused as kernel ring no_scheduler is true, but ring->sched.ready is true as well. Signed-off-by: Guchun Chen <guchun.chen@xxxxxxx> --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c index 80d6e132e409..afa76d069d94 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c @@ -630,7 +630,9 @@ int amdgpu_ring_test_helper(struct amdgpu_ring *ring) DRM_DEV_DEBUG(adev->dev, "ring test on %s succeeded\n", ring->name); - ring->sched.ready = !r; + /* Only set sched.ready on top of kernel scheduler. */ + if (!ring->no_scheduler) + ring->sched.ready = !r; return r; } -- 2.25.1