drm_property_create_enum(9)
π drm_property_create_enum(9) β a Kernel API Manual moment
okay so bestie, welcome to drm_property_create_enum, a page from the Kernel API Manual and honestly? it's a little icon. let's get into it π
β¨ NAME β¨
drm_property_create_enum β create a new enumeration property type β¨
π¦ SYNOPSIS π¦
struct drm_property * drm_property_create_enum (struct drm_device *dev ,
u32 flags , const char *name , const struct drm_prop_enum_list *props ,
int num_values );
π ARGUMENTS π
devβ the drm device, aka the main character π«Άflagsβ flags specifying the property type, like the little outfit the property wears πnameβ name of the property, so everyone knows who she is πpropsβ enumeration lists with property values, the whole menu fr frnum_valuesβ number of pre-defined values, i.e. how many options are on that menu π
πΈ DESCRIPTION πΈ
so this creates a new generic drm property, right? and then it can be attached to a drm object with drm_object_attach_property. the returned property object must be freed with drm_property_destroy, which β plot twist that's actually convenient β is done automatically when calling drm_mode_config_cleanup. no manual cleanup arc needed, we love that for us β¨
important bestie: userspace is only allowed to set one of the predefined values for enumeration properties. no inventing your own little values, that's not the vibe π
π RETURN π
A pointer to the newly created property on success, NULL on failure. so like, check it, don't just assume she showed up π₯²
π₯ SEE ALSO π₯
- Kernel file
./drivers/gpu/drm/drm_property.cβoverview(9) drm_property_create(9)drm_property_create_bitmask(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)
and that's the page!! π§ mwah π this one lives in ./drivers/gpu/drm, it's dated October 2026, and it's literally called drm_property_create_enum(9) β go off, queen ππ
π¦ 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