STRUCT MSM_GPU_SUBMITQUEUE(9)
π
struct msm_gpu_submitqueue(9) β kernel API manual, but make it make sense β¨
okay bestie, welcome to section 9 of the Kernel API Manual π β the one where we meet struct msm_gpu_submitqueue, aka a userspace created context. yes. that's the whole vibe. you make it in userspace, the kernel keeps track of it. iconic behavior honestly π
β¨ NAME β¨
struct msm_gpu_submitqueue β Userspace created context. that's it, that's the name, no notes π«Ά
π¦ SYNOPSIS π¦
here's the literal shape of it, copy it EXACTLY bestie, no freestyling π
struct msm_gpu_submitqueue {
int id;
u32 flags;
u32 ring_nr;
int faults;
uint32_t last_fence;
struct msm_context *ctx;
struct list_head node;
struct idr fence_idr;
struct spinlock idr_lock;
struct mutex lock;
struct kref ref;
struct drm_sched_entity *entity;
struct drm_sched_entity _vm_bind_entity[0];
};
πΈ MEMBERS πΈ
okay so every single field, and what it actually does, no skips:
idβ the userspace id for the submitqueue, and it's unique within thedrm_fileπ« so like, don't try to reuse it, it's not that kind of party.flagsβ userspace flags for the submitqueue, specified at creationβ¦ and lowkey they're currently unused π (yes the source really says "unusued", we don't fix typos here, we respect the lore).ring_nrβ the ringbuffer used by this submitqueue, which is determined by the submitqueue's priority. so priority in, ring out, main character energy πfaultsβ the number of GPU hangs associated with this submitqueue π not a flex, but a stat.last_fenceβ the sequence number of the last allocated fence (for error checking) π₯ctxβ the per-drm_filecontext associated with the submitqueue (ie. which set of pgtables do submits jobs associated with the submitqueue use) π§nodeβ node in the context's list of submitqueues π it's literally on the list.fence_idrβ maps fence-id todma_fencefor the userspace visible fence seqno, protected by the submitqueue lock πidr_lockβ for serializing access tofence_idr. one at a time, bestie βlockβ submitqueue lock for serializing submits on a queue π¦refβ reference count. classic. keep it alive fr fr πentityβ the submit job-queue β_vm_bind_entityβ used for entity pointer forVM_BINDqueues π (note the[0]up there β yes, it's that kind of array, we don't touch it, we just respect it)
π DESCRIPTION π
A submitqueue is associated with a gl context or a vk queue (or equiv) in userspace π so like, every time your app has a context or a queue, there's a submitqueue holding its spot. periodt.
π₯ SEE ALSO π₯
go read these next, iykyk:
- Kernel file
./drivers/gpu/drm/msm/msm_gpu.h struct msm_gpu_devfreq(9)struct msm_perfcntr_group_state(9)struct msm_perfcntr_state(9)struct msm_context(9)msm_context_is_vmbind(9)msm_gpu_convert_priority(9)
π one last thing π
this whole page lives at ./drivers/gpu/drm/msm, it's from October 2026, and yes, struct msm_gpu_submitqueue(9) is the header and the footer of this masterpiece π slay, go submit some queues, ily π«Άπβ¨
π¦ 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