[Public] Please ignore this patch, will send another one after more rework is done. Regards, Guchun > -----Original Message----- > From: Chen, Guchun <Guchun.Chen@xxxxxxx> > Sent: Wednesday, July 19, 2023 12:52 PM > To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx; Deucher, Alexander > <Alexander.Deucher@xxxxxxx>; Zhang, Hawking > <Hawking.Zhang@xxxxxxx>; Koenig, Christian > <Christian.Koenig@xxxxxxx>; Lazar, Lijo <Lijo.Lazar@xxxxxxx> > Cc: Chen, Guchun <Guchun.Chen@xxxxxxx> > Subject: [PATCH] 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. > > 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