drm_property_create_bitmask(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ drm_property_create_bitmask ✨

okay so bestie, this is a kernel API manual page for drm_property_create_bitmask(9) and honestly? it's a vibe. it lives in the Kernel API Manual, and we're gonna walk through it together, no cap πŸ’…


🌸 NAME 🌸

drm_property_create_bitmask β€” create a new bitmask property type πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct drm_property * drm_property_create_bitmask (struct drm_device
*dev , u32 flags , const char *name , const struct drm_prop_enum_list
*props , int num_props , uint64_t supported_bits );

like, that's the whole signature, exactly as it is, don't come for me 🫢


πŸ’– ARGUMENTS πŸ’–

  • dev β€” the drm device. the main character of this whole operation ✨
  • flags β€” flags specifying the property type. tells everyone what kind of property we're making πŸŽ€
  • name β€” name of the property. yes, it needs a name, everything iconic does πŸ’…
  • props β€” enumeration lists with property bitflags 🌸
  • num_props β€” size of the props array. literally how many of them there are πŸ”’
  • supported_bits β€” bitmask of all supported enumeration values. the whole menu of what's allowed πŸ‘‘

🌈 DESCRIPTION 🌈

so what does this actually do? it creates a new bitmask drm property, which you can then attach to a drm object with drm_object_attach_property. super straightforward, we love a clean handoff 🫢

heads up bestie: the returned property object must be freed with drm_property_destroy, which is done automatically when calling drm_mode_config_cleanup. so like, don't go freeing it yourself AND let the cleanup do it, that's not the vibe 😭

and here's the part that makes bitmask properties kinda special compared to plain enumeration properties: userspace is allowed to set any or'ed together combination of the predefined property bitflag values πŸ”₯ like, mix and match, that's the whole point, periodt.


⭐ RETURN ⭐

a pointer to the newly created property on success, NULL on failure. that's it, that's the deal πŸ’€


🧚 SEE ALSO 🧚

like, that's the whole friend group, go say hi to all of them πŸ’œ


and that's a wrap!! this one came from ./drivers/gpu/drm, dated October 2026 β€” mwah, bye bestie, go forth and bitmask responsibly πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from