STRUCT PANTHOR_QUEUE(9)
π NAME π
struct panthor_queue β Execution queue. Yes bestie, this page is the struct panthor_queue(9) entry from the Kernel API Manual, and we are about to go through every member like itβs a group-chat receipt π
β¨
β¨ SYNOPSIS β¨
struct panthor_queue {
struct drm_gpu_scheduler scheduler;
struct drm_sched_entity entity;
char *name;
struct {
struct delayed_work work;
unsigned long remaining;
} timeout;
u8 doorbell_id;
u8 priority;
#define CSF_MAX_QUEUE_PRIO GENMASK(3, 0);
struct panthor_kernel_bo *ringbuf;
struct {
struct panthor_kernel_bo *mem;
struct panthor_fw_ringbuf_input_iface *input;
const struct panthor_fw_ringbuf_output_iface *output;
u32 input_fw_va;
u32 output_fw_va;
} iface;
struct {
u64 gpu_va;
u64 ref;
bool gt;
bool sync64;
struct drm_gem_object *obj;
u64 offset;
void *kmap;
} syncwait;
struct {
spinlock_t lock;
u64 id;
atomic64_t seqno;
struct dma_fence *last_fence;
struct list_head in_flight_jobs;
} fence_ctx;
struct {
struct panthor_kernel_bo *slots;
u32 slot_count;
u32 seqno;
} profiling;
};
π Members π
schedulerβ the DRM scheduler used for this queue. Main character of the scheduling situation.entityβ the DRM scheduling entity used for this queue.nameβ the DRM scheduler name for this queue. Itβs giving name tag energy.timeoutβ queue timeout related fields, bestie.timeout.workβ the work executed when a queue timeout occurs.timeout.remainingβ time remaining before a queue timeout.
When the timer is running,timeout.remainingis set toMAX_SCHEDULE_TIMEOUT. When the timer is suspended, itβs set to the time remaining when the timer was suspended.
doorbell_idβ the doorbell assigned to this queue.
Right now, all groups share the same doorbell, and the doorbell ID is assigned to group_slot + 1 when the group is assigned a slot. But we might decide to provide fine grained doorbell assignment at some point, so we donβt have to wake up all queues in a group every time one of them is updated.
priorityβ the priority of the queue inside the group.
Must be less than 16 β only 4 bits available, periodt.
ringbufβ the command stream ring-buffer.ifaceβ firmware interface. The whole FW communication situation.iface.memβ FW memory allocated for this interface.iface.inputβ input interface.iface.outputβ output interface.iface.input_fw_vaβ FW virtual address of the input interface buffer.iface.output_fw_vaβ FW virtual address of the output interface buffer.
syncwaitβ stores information about the synchronization object this queue is waiting on.syncwait.gpu_vaβ GPU address of the synchronization object.syncwait.refβ reference value to compare against.syncwait.gtβtrueif this is a greater-than test.syncwait.sync64βtrueif this is a 64-bit sync object.syncwait.objβ buffer object holding the synchronization object.syncwait.offsetβ offset of the synchronization object insidebo.syncwait.kmapβ kernel mapping of the buffer object holding the synchronization object.
fence_ctxβ fence context fields, aka the fence lore.fence_ctx.lockβ used to protect access to all fences allocated by this context.fence_ctx.idβ fence context ID. Allocated withdma_fence_context_alloc.fence_ctx.seqnoβ sequence number of the last initialized fence.fence_ctx.last_fenceβ fence of the last submitted job.
We return this fence when we get an empty command stream. This way, we are guaranteed that all earlier jobs have completed when drm_sched_job::s_fence::finished without having to feed the CS ring buffer with a dummy job that only signals the fence.
fence_ctx.in_flight_jobsβ list containing all in-flight jobs.
Used to keep track and signal panthor_job::done_fence when the synchronization object attached to the queue is signaled.
profilingβ job profiling data slots and access information.profiling.slotsβ kernel BO holding the slots.profiling.slot_countβ number of jobs ringbuffer can hold at once.profiling.seqnoβ index of the next available profiling information slot.
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/panthor/panthor_sched.cβ the source file for all this scheduler magic. 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)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)struct panthor_job(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)
Okay thatβs the whole struct panthor_queue(9) page, bestie. Source/version: ./drivers/gpu/drm/panthor Β· date: October 2026 β mwah, slay, and close the tab gently ππβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms