drm_property_create_bitmask(9)
β¨ 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 thepropsarray. 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 withdrm_property_destroy, which is done automatically when callingdrm_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 π§
- Kernel file
./drivers/gpu/drm/drm_property.c overview(9)drm_property_create(9)drm_property_create_enum(9)drm_property_create_range(9)drm_property_create_signed_range(9)drm_property_create_object(9)drm_property_create_bool(9)drm_property_add_enum(9)drm_property_destroy(9)drm_property_create_blob(9)drm_property_blob_put(9)drm_property_blob_get(9)drm_property_lookup_blob(9)drm_property_replace_global_blob(9)drm_property_replace_blob(9)drm_property_replace_blob_from_id(9)
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
- 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