STRUCT PANTHOR_JOB(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct panthor_job(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual ✨ this one's all about struct panthor_job β€” and no cap, it's literally the struct used to manage a GPU job πŸ‘‘ think of it as the main character of the scheduler's group chat 🫢


🌸 NAME 🌸

struct panthor_job β€” literally the struct used to manage GPU jobs πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

struct panthor_job {
    struct drm_sched_job base;
    struct kref refcount;
    struct panthor_group *group;
    u32 queue_idx;
    struct {
      u64 start;
      u32 size;
      u32 latest_flush;
    } call_info;
    struct {
      u64 start;
      u64 end;
    } ringbuf;
    struct list_head node;
    struct dma_fence *done_fence;
    struct {
      u32 mask;
      u32 slot;
    } profiling;
 };

like, look at her. absolutely iconic layout πŸ’…


πŸ¦‹ MEMBERS πŸ¦‹

  • base β€” inherits from drm_sched_job, so all that scheduler DNA is already baked in 🧬
  • refcount β€” the reference count. classic kref behaviour, we love to see it ✨
  • group β€” pointer to the group of the queue this job is gonna get pushed to 🎯
  • queue_idx β€” the index of the queue inside group. iykyk πŸ”’
  • call_info β€” all the deets about the userspace command stream call πŸ’¬
    • call_info.start β€” GPU address of the userspace command stream πŸ“
    • call_info.size β€” size of the userspace command stream πŸ“
    • call_info.latest_flush β€” the flush ID at the time the userspace command stream was built. it's needed for the flush reduction mechanism, so don't sleep on it πŸ”₯
  • ringbuf β€” where this job's position lives in the ring buffer πŸŒ€
    • ringbuf.start β€” start offset
    • ringbuf.end β€” end offset
  • node β€” used to insert the job into the panthor_queue::fence_ctx::in_flight_jobs list. it's giving linked-list excellence πŸ’«
  • done_fence β€” the fence that gets signaled when the job is finished or cancelled. closure either way, periodt πŸ’€βœ…
  • profiling β€” the job profiling info πŸ“Š
    • profiling.mask β€” current device job profiling enablement bitmask πŸŽ›οΈ
    • profiling.slot β€” the job's index in the profiling slots BO πŸ”–

🌈 SEE ALSO 🌈

Kernel file ./drivers/gpu/drm/panthor/panthor_sched.c Scheduler(9), struct panthor_csg_slot(9), enum panthor_csg_priority(9), struct panthor_scheduler(9), struct panthor_syncobj_32b(9), struct panthor_syncobj_64b(9), struct panthor_queue(9), enum panthor_group_state(9), struct panthor_group(9), group_queue_work(9), sched_queue_work(9), sched_queue_delayed_work(9), struct panthor_group_pool(9), group_bind_locked(9), group_unbind_locked(9), cs_slot_prog_locked(9), cs_slot_reset_locked(9), csg_slot_sync_priority_locked(9), cs_slot_sync_queue_state_locked(9), sched_process_global_irq_locked(9), panthor_sched_report_fw_events(9), panthor_sched_report_mmu_fault(9), panthor_fdinfo_gather_group_mem_info(9)


and that's the whole page, bestie 🫢 this one lives in ./drivers/gpu/drm/panthor, dated October 2026, and yeah β€” she's struct panthor_job(9) πŸ’œ mwah, go read the scheduler source, ily πŸ’–

πŸ“¦ where this page comes from