[PATCH 2/2] drm/sched: Deprecate drm_sched_wqueue_ready()

From: Philipp Stanner

Date: Mon Jun 29 2026 - 06:42:56 EST


drm_sched_wqueue_ready() stems from an old rework, see

commit faf6e1a87e07 ("drm/sched: Add boolean to mark if sched is ready to work v5")

That commit moved tracking of the hardware ring's state was moved into
drm_sched.

This is highly racy and problematic and something that should most
certainly be covered by the driver.

Deprecate drm_sched_wqueue_ready().

Signed-off-by: Philipp Stanner <phasta@xxxxxxxxxx>
---
drivers/gpu/drm/scheduler/sched_main.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
index c4e4ac436a86..35a7892c8dc8 100644
--- a/drivers/gpu/drm/scheduler/sched_main.c
+++ b/drivers/gpu/drm/scheduler/sched_main.c
@@ -1198,10 +1198,14 @@ void drm_sched_increase_karma(struct drm_sched_job *bad)
EXPORT_SYMBOL(drm_sched_increase_karma);

/**
- * drm_sched_wqueue_ready - Is the scheduler ready for submission
+ * drm_sched_wqueue_ready - Is the scheduler ready for submission (DEPRECATED)
*
* @sched: scheduler instance
*
+ * Deprecated, don't use it in new code. This function was added to have the
+ * scheduler represent the hardware ring's state, which must be represented by
+ * the driver's respective data structures.
+ *
* Returns true if submission is ready
*/
bool drm_sched_wqueue_ready(struct drm_gpu_scheduler *sched)
--
2.54.0