Message ID | 20250114105942.64832-1-tvrtko.ursulin@igalia.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | drm/sched: Remove weak paused submission checks | expand |
On Tue, 2025-01-14 at 10:59 +0000, Tvrtko Ursulin wrote: > There is no need to check the boolean in the work item's prologues > since > the boolean can be set at any later time anyway. > > The helper which pauses submission sets it and synchronously cancels > the > work and helpers which queue the work check for the flag so all > should be > good. > > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Ah yes, good catch. Applied to drm-misc-next, thanks. > Cc: Christian König <christian.koenig@amd.com> > Cc: Danilo Krummrich <dakr@redhat.com> > Cc: Matthew Brost <matthew.brost@intel.com> > Cc: Philipp Stanner <pstanner@redhat.com> btw. FYI Danilo and I preferably now use these addresses: Danilo Krummrich <dakr@kernel.org> Philipp Stanner <phasta@kernel.org> Danilo's is already in the MAINTAINERS file, mine should follow soon. Regards P. > --- > drivers/gpu/drm/scheduler/sched_main.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/gpu/drm/scheduler/sched_main.c > b/drivers/gpu/drm/scheduler/sched_main.c > index 57da84908752..2d3d71e053a6 100644 > --- a/drivers/gpu/drm/scheduler/sched_main.c > +++ b/drivers/gpu/drm/scheduler/sched_main.c > @@ -1166,9 +1166,6 @@ static void drm_sched_free_job_work(struct > work_struct *w) > container_of(w, struct drm_gpu_scheduler, > work_free_job); > struct drm_sched_job *job; > > - if (READ_ONCE(sched->pause_submit)) > - return; > - > job = drm_sched_get_finished_job(sched); > if (job) > sched->ops->free_job(job); > @@ -1192,9 +1189,6 @@ static void drm_sched_run_job_work(struct > work_struct *w) > struct drm_sched_job *sched_job; > int r; > > - if (READ_ONCE(sched->pause_submit)) > - return; > - > /* Find entity with a ready job */ > entity = drm_sched_select_entity(sched); > if (!entity)
diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c index 57da84908752..2d3d71e053a6 100644 --- a/drivers/gpu/drm/scheduler/sched_main.c +++ b/drivers/gpu/drm/scheduler/sched_main.c @@ -1166,9 +1166,6 @@ static void drm_sched_free_job_work(struct work_struct *w) container_of(w, struct drm_gpu_scheduler, work_free_job); struct drm_sched_job *job; - if (READ_ONCE(sched->pause_submit)) - return; - job = drm_sched_get_finished_job(sched); if (job) sched->ops->free_job(job); @@ -1192,9 +1189,6 @@ static void drm_sched_run_job_work(struct work_struct *w) struct drm_sched_job *sched_job; int r; - if (READ_ONCE(sched->pause_submit)) - return; - /* Find entity with a ready job */ entity = drm_sched_select_entity(sched); if (!entity)
There is no need to check the boolean in the work item's prologues since the boolean can be set at any later time anyway. The helper which pauses submission sets it and synchronously cancels the work and helpers which queue the work check for the flag so all should be good. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Cc: Christian König <christian.koenig@amd.com> Cc: Danilo Krummrich <dakr@redhat.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Philipp Stanner <pstanner@redhat.com> --- drivers/gpu/drm/scheduler/sched_main.c | 6 ------ 1 file changed, 6 deletions(-)