drm/amdgpu: update sched.ready within kernel drm scheduler
Subsystems (2)
PATCH 1/1 drm/amdgpu: update sched.ready within kernel drm scheduler
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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +3 -1
@@ -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; }
Signature · 1 line
2.25.1
[Public]
Please ignore this patch, will send another one after more rework is done.
Regards,
Guchun
Quoted 41 lines
-----Original Message-----
From: Chen, Guchun <[email protected]>
Sent: Wednesday, July 19, 2023 12:52 PM
To: [email protected]; Deucher, Alexander <[email protected]>; Zhang, Hawking <[email protected]>; Koenig, Christian <[email protected]>; Lazar, Lijo <[email protected]>
Cc: Chen, Guchun <[email protected]>
Subject: [PATCH] drm/amdgpu: update sched.ready within kernel drm scheduler
amdgpu_test_ring_helperwill set sched.ready unconditionally based on ring test result, this will lead value mismatch betweenring->sched.readyandno_schedulerfor those rings without a kernel scheluer, after they perform ring test. This will be confused as kernel ringno_scheduleris true, butring->sched.readyis true as well.Signed-off-by Guchun Chen <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +3
-2@@ -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