drm_property_create_object(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_property_create_object β€” and yes bestie, that's a (9) kernel API manual page, we're in the kernel section today

okay so picture this: you're deep in drivers/gpu/drm, you need a brand new object property type, and you open the Kernel API Manual. That's literally this page. Section 9, kernel API, we're so back. ✨


πŸŽ€ NAME πŸŽ€

drm_property_create_object β€” creates a new object property type. yes that's it, that's the whole job, and it does it gorgeously. 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

struct drm_property * drm_property_create_object (struct drm_device *dev
, u32 flags , const char *name , uint32_t type );

look at that signature. four args, one pointer back, no notes. πŸ’œ


🌸 ARGUMENTS 🌸

  • dev β€” the drm device. the main character of the whole operation ngl.
  • flags β€” flags specifying the property type. flags do be flagging.
  • name β€” name of the property. give it a good one, it's gonna live on the object fr fr.
  • type β€” the object type, taken from the DRM_MODE_OBJECT_* defines. iykyk.

✨ DESCRIPTION ✨

so here's the vibe: this creates a new generic drm property, which you can then attach to a drm object using drm_object_attach_property. cute, right? πŸ’–

the returned property object must be freed with drm_property_destroy β€” but plot twist, that's done automatically when you call drm_mode_config_cleanup, so you don't have to chase it down yourself. lowkey iconic of it.

userspace is only allowed to set this to any property value of the given type. that's the rule, no cap. also, this is only useful for atomic properties, which is enforced β€” not a suggestion, an actual enforcement. πŸ™ˆ


πŸ”₯ RETURN πŸ”₯

a pointer to the newly created property on success, NULL on failure. that's the whole deal. slay. πŸ‘‘


⭐ SEE ALSO ⭐

okay this list is long and honestly every single one of them ate:


πŸ“ reminder bestie: if you create it, somebody (possibly drm_mode_config_cleanup) destroys it. don't be weird about it.

and that's the page!! 🌈 cute sign-off time: this one lives under ./drivers/gpu/drm and it's dated October 2026, part of the Kernel API Manual, and its name is β€” say it with me β€” drm_property_create_object(9). periodt. πŸ’…πŸŒΈ

πŸ“¦ where this page comes from