i915_gem_wait_ioctl(9)
π« i915_gem_wait_ioctl(9) π«
okay so bestie, this is the manual page for i915_gem_wait_ioctl β it's literally the function that implements DRM_IOCTL_I915_GEM_WAIT, and we're gonna get into it. no cap, it's iconic in a "quietly doing GPU wait stuff" kinda way. π
π SYNOPSIS π
int i915_gem_wait_ioctl (struct drm_device *dev , void *data , struct
drm_file *file );
β¨ ARGUMENTS β¨
devβ the drm device pointer, aka the main character of your GPU world. π₯οΈdataβ the ioctl data blob. it's giving "mystery payload" but in a fun way. π«Άfileβ the drm file pointer. which file? the drm one, babes. π
π DESCRIPTION π
So here's the tea, bestie: this function returns 0 if everything's slay, and if not, it throws an error and leaves the remaining time in the timeout parameter. let's break down the error codes, because there are... a few:
-ETIMEβ the object is still busy after timeout. like, it literally didn't finish in time, rude. π-ERESTARTSYSβ a signal interrupted the wait. so dramatic, honestly. β‘-ENONENTβ the object doesn't exist. gone. not invited to the party. π-EAGAINβ incomplete, restart syscall. also possible but rare, so don't stress unless it happens. π-ENOMEMβ "damn" is the official technical term for this one. memory said no. πΈ-ENODEVβ internal IRQ fail. the hardware is having a moment. π-E?β the add request failed. the?is doing a lot of heavy lifting, iykyk. π€·ββοΈ
now for the important part, so listen up: the wait ioctl with a timeout of 0 reimplements the busy ioctl. with any non-zero timeout parameter, the wait ioctl will wait for the given number of nanoseconds on an object becoming unbusy. but here's the plot twist β since the wait occurs without holding a global or exclusive lock, the object may become re-busied before this function completes. a similar but shorter race condition exists in the busy ioctl. so yeah, that's a whole vibe. not a bug exactly, just... the situation. π©
π¦ SEE ALSO π¦
- Kernel file
./drivers/gpu/drm/i915/gem/i915_gem_wait.cβ the source, the origin story, the blueprint. π i915_gem_object_wait(9)β related function, go check it out. πi915_gem_object_wait_migration(9)β migration-flavored waiting, also valid. π
and that's the whole page, bestie! this icon came from ./drivers/gpu/drm/i915/gem and it's dated October 2026, version i915_gem_wait_ioctl(9). love that for us. now go forth and wait on objects responsibly! ππβ¨
π¦ 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