drm_mode_con...nitial_state(9)
π¦ NAME π¦
okay so bestie, welcome to the Kernel API Manual page for drm_mode_config_create_initial_state β and what does it do?? it allocates the initial state. that's the whole vibe. π
β¨ SYNOPSIS β¨
int drm_mode_config_create_initial_state (struct drm_device *dev );
like, you hand it a device and it gives you back an int. iconic signature, no notes. π«Ά
π ARGUMENTS π
devβ the drm device. that's it. that's the whole argument list. she's low-maintenance. π
πΈ DESCRIPTION πΈ
so this function creates the initial state for all the objects. yes, all of them. π«‘
drivers can use this in e.g. probe to initialize their software state. perfect for that "first day of school" moment where everything needs to exist before anything actually happens. β¨
now here's the tea, because it has two main differences with drm_mode_config_reset and you need to know them:
- the reset hooks aren't called, and thus the hardware will be left untouched β like, she does NOT touch the hardware, she's strictly a software girlie here. π
- the
drm_private_objstructures will be initialized, as opposed todrm_mode_config_reset, which skips them. so if you were relying on the reset path and wondering why your private objs are sitting there un-initializedβ¦ yeah. that's why. π
π₯ RETURN π₯
0on success π- negative error value on failure π
that's it. no secret third thing. periodt.
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/drm_mode_config.cβ go read the source, iykwim π drm_mode_getresources(9)drm_mode_config_reset(9)drmm_mode_config_init(9)drm_mode_config_cleanup(9)
okay that's the whole page bestie, you ate that π β and for the credits moment: this one lives over in ./drivers/gpu/drm, dated October 2026, and the header's manual name is the Kernel API Manual. go forth and initialize your state, main character ππ§
π¦ 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