All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Decouple amdgpu from the scheduler, a bit
@ 2025-02-05 15:33 Tvrtko Ursulin
  2025-02-05 15:33 ` [PATCH 1/4] drm/scheduler: Add drm_sched_cancel_all_jobs helper Tvrtko Ursulin
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Tvrtko Ursulin @ 2025-02-05 15:33 UTC (permalink / raw)
  To: amd-gfx
  Cc: kernel-dev, Tvrtko Ursulin, Christian König,
	Danilo Krummrich, Matthew Brost, Philipp Stanner

General idea is to try and access scheduler data structures less from the
drivers so the series basically adds some helpers to move closer towards that
goal.

Three copies of the same to_drm_sched_job macro get removed and by the end of
the series, as a bonus, we can now re-order members of struct drm_sched_job and
eliminate a hole.

I did not here from folks on which direction we want to take this after v1 so
I went ahead and sketched up a different flavour in v2. The
drm_sched_cancel_all_jobs() helper can be removed if (or when) amdgpu can change
the approach of implementing its permanently wedged state. But until then I see
no harm to clean up that, and even more so the to_drm_sched_job and its hidden
dependency on queue_node being the first element.

v2:
 * Add header file for internal scheduler API.
 * Add helper for peeking too. (Danilo)
 * Add (temporary?) drm_sched_cancel_all_jobs() helper to replace amdgpu
   amdgpu_job_stop_all_jobs_on_sched().

Cc: Christian König <christian.koenig@amd.com>
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Philipp Stanner <phasta@kernel.org>

Tvrtko Ursulin (4):
  drm/scheduler: Add drm_sched_cancel_all_jobs helper
  drm/amdgpu: Use drm_sched_cancel_all_jobs helper
  drm/sched: Add internal job peek/pop API
  drm/sched: Make the type of drm_sched_job->last_dependency consistent

 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |  3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_job.c    | 34 ---------------
 drivers/gpu/drm/amd/amdgpu/amdgpu_job.h    |  2 -
 drivers/gpu/drm/scheduler/sched_entity.c   | 11 +++--
 drivers/gpu/drm/scheduler/sched_internal.h | 43 ++++++++++++++++++
 drivers/gpu/drm/scheduler/sched_main.c     | 51 ++++++++++++++++++++--
 include/drm/gpu_scheduler.h                | 39 +++++++++--------
 7 files changed, 118 insertions(+), 65 deletions(-)
 create mode 100644 drivers/gpu/drm/scheduler/sched_internal.h

-- 
2.48.0


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-02-06 16:29 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-05 15:33 [PATCH v2 0/4] Decouple amdgpu from the scheduler, a bit Tvrtko Ursulin
2025-02-05 15:33 ` [PATCH 1/4] drm/scheduler: Add drm_sched_cancel_all_jobs helper Tvrtko Ursulin
2025-02-05 15:42   ` Christian König
2025-02-06 13:35   ` Philipp Stanner
2025-02-06 13:42     ` Tvrtko Ursulin
2025-02-06 13:46     ` Christian König
2025-02-06 13:53       ` Tvrtko Ursulin
2025-02-06 14:00         ` Philipp Stanner
2025-02-06 14:01         ` Christian König
2025-02-06 13:53       ` Philipp Stanner
2025-02-06 14:25       ` Danilo Krummrich
2025-02-06 15:04       ` Zhang, Hawking
2025-02-05 15:33 ` [PATCH 2/4] drm/amdgpu: Use " Tvrtko Ursulin
2025-02-05 15:33 ` [PATCH 3/4] drm/sched: Add internal job peek/pop API Tvrtko Ursulin
2025-02-06 13:39   ` Philipp Stanner
2025-02-05 15:33 ` [PATCH 4/4] drm/sched: Make the type of drm_sched_job->last_dependency consistent Tvrtko Ursulin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.