drm_kunit_h..._state_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_kunit_h..._state_alloc(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual ✨ β€” this page is literally about drm_kunit_helper_atomic_state_alloc, and no, we're not abbreviating it, it's the whole vibe. πŸŽ€


✨ NAME ✨

drm_kunit_helper_atomic_state_alloc β€” Allocates an atomic state πŸ¦‹


🌸 SYNOPSIS 🌸

struct drm_atomic_commit * drm_kunit_helper_atomic_state_alloc (struct
kunit *test , struct drm_device *drm , struct drm_modeset_acquire_ctx
*ctx );

like, look at that signature. iconic. no notes. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • test β€” the test context object, aka the main character of this whole situation πŸ‘‘
  • drm β€” the device you're allocating the state for πŸ–₯️
  • ctx β€” the locking context for that atomic update πŸ”’

πŸ¦‹ DESCRIPTION πŸ¦‹

So what it does: it allocates an empty atomic state ✨. Empty. Blank slate. fresh start energy. 🫢

and here's the important bit, bestie, pay attention β€”

the state is tied to the kunit test context, which means you must not call drm_atomic_commit_put on it 😭 it literally gets done automatically. not you. the test context handles it. stay in your lane, it's giving delegation. πŸ’€


πŸ”₯ RETURN πŸ”₯

  • an ERR_PTR on error πŸ™ˆ
  • a pointer to the newly allocated state otherwise β€” slay ⭐

🌈 SEE ALSO 🌈

Kernel file ./drivers/gpu/drm/tests/drm_kunit_helpers.c β€” go read it, iykyk πŸ“–


and that's the page, bestie πŸ’– catch you in ./drivers/gpu/drm/tests, October 2026 β€” signed, sealed, and delivered by drm_kunit_h..._state_alloc(9) πŸ§šπŸ’œ

πŸ“¦ where this page comes from