drm_sched_job_cleanup(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_sched_job_cleanup(9) πŸ’…

okay bestie, welcome to the Kernel API Manual β€” this one's a shortie but she's important, so pay attention πŸŽ€


✨ NAME ✨

drm_sched_job_cleanup β€” clean up scheduler job resources 🧹


✨ SYNOPSIS ✨

void drm_sched_job_cleanup (struct drm_sched_job *job );

✨ ARGUMENTS ✨

  • job β€” the scheduler job we're cleaning up, bestie. that's the one. 🫢

✨ DESCRIPTION ✨

So here's the tea β˜• β€” this function cleans up all the resources that were allocated with drm_sched_job_init. Like, all of them. she's a thorough queen πŸ’…

Drivers should call this from their error unwind code if job is aborted before drm_sched_job_arm is called. that's the window, okay? that's your moment. πŸͺŸ

Now listen, this part matters β€” drm_sched_job_arm is a point of no return πŸ”₯πŸ”₯πŸ”₯ because it initializes the fences and their sequence number etc. Once that function has been called, you *must* submit it with drm_sched_entity_push_job and you literally cannot just abort it by calling drm_sched_job_cleanup. no cap. there's no take-backsies after drm_sched_job_arm, that ship has sailed 😭

⚠️ fr fr: after drm_sched_job_arm, cleanup is NOT an abort button. you commit. you push. periodt. πŸ‘‘

This function should be called in the drm_sched_backend_ops.free_job callback. that's her home. that's where she lives 🏠✨


✨ SEE ALSO ✨

okay this list is long but we don't gatekeep here πŸ’– go read:


and that's the whole page, icon behavior only 🌈 this lil gem lives in ./drivers/gpu/drm/scheduler, dated October 2026 β€” go clean up your jobs responsibly, bestie πŸŽ€βœ¨πŸ’œ

πŸ“¦ where this page comes from