drm_property_create(9)
π drm_property_create(9) π
okay so bestie, welcome to the Kernel API Manual β yes that's the manual name, we're fancy now β¨ β and today's main character is drm_property_create, the function that literally makes properties out of thin air. no cap.
π¦ NAME π¦
drm_property_create β create a new property type π
πΈ SYNOPSIS πΈ
struct drm_property * drm_property_create (struct drm_device *dev , u32
flags , const char *name , int num_values );
like, that's the whole vibe right there. four args, one dream π
β¨ ARGUMENTS β¨
devβ the drm device, aka the whole reason we're here π«Άflagsβ the flags that specify the property type, iykyknameβ the name of the property, what it says on the tinnum_valuesβ how many pre-defined values it gets, the headcount basically
π₯ DESCRIPTION π₯
so what does it actually do. it creates a shiny new generic drm property π and then you can attach that property to a drm object using drm_object_attach_property β that's the whole arc of the story.
but listen, and this is the part you cannot skip: the property object it returns back to you must be freed with drm_property_destroy π. like, it's not optional, bestie. the good news? that freeing happens automatically when you call drm_mode_config_cleanup π§ so if you're going through cleanup properly you're lowkey fine.
not me reminding you twice: free it withdrm_property_destroy, or letdrm_mode_config_cleanupdo it for you. no leaks on my watch π
π RETURN π
on success you get a pointer to the newly created property β slay ππ
on failure you get NULL β π no property, no vibes, just sadness.
β SEE ALSO β
the whole friend group π«Ά:
- the kernel file
./drivers/gpu/drm/drm_property.c overview(9)drm_property_create_enum(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 tea π
this whole thing lives in ./drivers/gpu/drm, it's dated October 2026, and it's literally the drm_property_create(9) page. periodt π
β¨
π¦ 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