drm_property_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_property_create(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual β€” yes that's the manual name, we're fancy now ✨ β€” and today's main character is drm_property_create, the function that literally makes properties out of thin air. no cap.


πŸ¦‹ NAME πŸ¦‹

drm_property_create β€” create a new property type πŸ’–


🌸 SYNOPSIS 🌸

struct drm_property * drm_property_create (struct drm_device *dev , u32
flags , const char *name , int num_values );

like, that's the whole vibe right there. four args, one dream πŸŽ€


✨ ARGUMENTS ✨

  • dev β€” the drm device, aka the whole reason we're here 🫢
  • flags β€” the flags that specify the property type, iykyk
  • name β€” the name of the property, what it says on the tin
  • num_values β€” how many pre-defined values it gets, the headcount basically

πŸ”₯ DESCRIPTION πŸ”₯

so what does it actually do. it creates a shiny new generic drm property πŸŽ€ and then you can attach that property to a drm object using drm_object_attach_property β€” that's the whole arc of the story.

but listen, and this is the part you cannot skip: the property object it returns back to you must be freed with drm_property_destroy πŸ’€. like, it's not optional, bestie. the good news? that freeing happens automatically when you call drm_mode_config_cleanup 🧚 so if you're going through cleanup properly you're lowkey fine.

not me reminding you twice: free it with drm_property_destroy, or let drm_mode_config_cleanup do it for you. no leaks on my watch πŸ’…

🌈 RETURN 🌈

on success you get a pointer to the newly created property β€” slay πŸ’–πŸ‘‘

on failure you get NULL β€” 😭 no property, no vibes, just sadness.


⭐ SEE ALSO ⭐

the whole friend group 🫢:


and that's the tea πŸ“

this whole thing lives in ./drivers/gpu/drm, it's dated October 2026, and it's literally the drm_property_create(9) page. periodt πŸ’…βœ¨

πŸ“¦ where this page comes from