drm_mode_con...nitial_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ 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:

  1. 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. πŸ™ˆ
  2. the drm_private_obj structures will be initialized, as opposed to drm_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 πŸ”₯

  • 0 on success πŸŽ‰
  • negative error value on failure 😭

that's it. no secret third thing. periodt.


🌈 SEE ALSO 🌈


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