drm_property_create_enum(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 fr
  • num_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 πŸ”₯


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