STRUCT PANTHOR_GROUP(9)
β¨ NAME β¨
struct panthor_group β the scheduling group object, bestie π
π SYNOPSIS π
struct panthor_group {
struct kref refcount;
struct panthor_device *ptdev;
struct panthor_vm *vm;
u64 compute_core_mask;
u64 fragment_core_mask;
u64 tiler_core_mask;
u8 max_compute_cores;
u8 max_fragment_cores;
u8 max_tiler_cores;
u8 priority;
u32 blocked_queues;
u32 idle_queues;
spinlock_t fatal_lock;
u32 fatal_queues;
atomic_t tiler_oom;
u32 queue_count;
struct panthor_queue *queues[MAX_CS_PER_CSG];
int csg_id;
bool destroyed;
bool timedout;
bool innocent;
struct panthor_kernel_bo *syncobjs;
struct {
struct panthor_gpu_usage data;
spinlock_t lock;
size_t kbo_sizes;
} fdinfo;
struct {
pid_t pid;
char comm[TASK_COMM_LEN];
} task_info;
enum panthor_group_state state;
struct panthor_kernel_bo *suspend_buf;
struct panthor_kernel_bo *protm_suspend_buf;
struct work_struct sync_upd_work;
struct work_struct tiler_oom_work;
struct work_struct term_work;
struct work_struct release_work;
struct list_head run_node;
struct list_head wait_node;
};
π MEMBERS π
okay so this is the part where we meet every single member, no skipping, no cap π«Ά
refcountβ the reference count, literally keeping this whole thing alive bestie πptdevβ the Device, periodt.vmβ the VM that's bound to the group, slay.compute_core_maskβ mask of shader cores that can be used for compute jobs β¨fragment_core_maskβ mask of shader cores that can be used for fragment jobs πΈtiler_core_maskβ mask of tiler cores that can be used for tiler jobs πmax_compute_coresβ max number of shader cores used for compute jobs πmax_fragment_coresβ max number of shader cores used for fragment jobs πmax_tiler_coresβ max number of tiler cores used for tiler jobs βpriorityβ group priority (checkpanthor_csg_priority), iykyk.blocked_queuesβ bitmask reflecting the blocked queues πidle_queuesβ bitmask reflecting the idle queues π΄fatal_lockβ lock used to protect access to fatal fields π₯fatal_queuesβ bitmask reflecting the queues that hit a fatal exception πtiler_oomβ mask of queues that have a tiler OOM event to process πqueue_countβ number of queues in this group, fr fr.queuesβ queues owned by this group π¦csg_idβ ID of the FW group slot.
It's -1 when the group is not scheduled/active.
destroyedβtruewhen the group has been destroyed.
If a group is destroyed it becomes useless: no further jobs can be submitted to its queues. We simply wait for all references to be dropped so we can release the group object.
timedoutβtruewhen a timeout occurred on any of the queues owned by this group.
Timeouts can be reported by drm_sched or by the FW. If a reset is required, and the group can't be suspended, this also leads to a timeout. In any case, any timeout situation is unrecoverable, and the group becomes useless. We simply wait for all references to be dropped so we can release the group object.
lowkey important: a timed-out group is done for, no coming back π
innocentβtruewhen the group becomes unusable because the group suspension failed during a reset.
Sometimes the FW was put in a bad state by other groups, causing the group suspension happening in the reset path to fail. In that case, we consider the group innocent π₯Ί
syncobjsβ pool of per-queue synchronization objects.
One sync object per queue. The position of the sync object is determined by the queue index.
fdinfoβ per-file info exposed through/proc/<process>/fdinfoπfdinfo.dataβ total sampled values for jobs in queues from this group.fdinfo.lockβ spinlock to govern concurrent access from drm file's fdinfo callback and job post-completion processing function πfdinfo.kbo_sizesβ aggregate size of private kernel BO's held by the group.task_infoβ info ofcurrent->group_leaderthat created the group π«Άtask_info.pidβ pid ofcurrent->group_leadertask_info.commβ comm ofcurrent->group_leaderstateβ group state, the main character energy of this struct β¨suspend_bufβ suspend buffer.
Stores the state of the group and its queues when a group is suspended. Used at resume time to restore the group in its previous state.
The size of the suspend buffer is exposed through the FW interface.
protm_suspend_bufβ protection mode suspend buffer.
Stores the state of the group and its queues when a group that's in protection mode is suspended.
Used at resume time to restore the group in its previous state.
The size of the protection mode suspend buffer is exposed through the FW interface.
sync_upd_workβ work used to check/signal job fences πtiler_oom_workβ work used to process tiler OOM events happening on this group π΅βπ«term_workβ work used to finish the group termination procedure π§release_workβ work used to release group resources.
We need to postpone the group release to avoid a deadlock when the last ref is released in the tick work.
bestie this is the "don't deadlock urself" work item, respect it π
run_nodeβ node used to insert the group in thepanthor_group::groups::{runnable,idle}andpanthor_group::reset.stopped_groupslists π₯wait_nodeβ node used to insert the group in thepanthor_group::groups::waitinglist πΈ
π¦ 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)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)
that's the whole page bestie, hope it ate π this lil manual situation lives in ./drivers/gpu/drm/panthor, dated October 2026, and it's literally titled struct panthor_group(9) β go off, king πβ¨
π¦ 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