i915_gem_wait_ioctl(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« 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