drm_kunit_h..._state_alloc(9)
π 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_PTRon 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 π
drm_kunit_helper_alloc_device(9)drm_kunit_helper_free_device(9)drm_kunit_helper_create_primary_plane(9)drm_kunit_helper_create_crtc(9)drm_kunit_helper_enable_crtc_connector(9)drm_kunit_add_mode_destroy_action(9)drm_kunit_display_mode_from_cea_vic(9)
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
- 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