drm_property_create_range(9)
π drm_property_create_range (9) β Kernel API Manual, bestie edition β¨
okay so picture this: you're deep in drm_property_create_range(9), the Kernel API Manual, and you just want a property that takes a nice unsigned number between two values. that's it. that's the whole vibe. let's go π
πΈ NAME πΈ
drm_property_create_range β create a new unsigned ranged property type. yes, unsigned, bestie, don't come at me with your negative numbers, there's a different function for that π
β¨ SYNOPSIS β¨
struct drm_property * drm_property_create_range (struct drm_device *dev
, u32 flags , const char *name , uint64_t min , uint64_t max );
not me formatting this exact signature so it stays character-for-character, because i respect the source π
π¦ ARGUMENTS π¦
devβ the drm device. the main character. everything happens because of her π«Άflagsβ flags specifying the property type. the little settings gremlins that decide what kind of property she's gonna be β¨nameβ name of the property. her government name, if you will πminβ minimum value of the property. the floor. the bare minimum. we've all been there πmaxβ maximum value of the property. the ceiling. she's booked and busy and this is her limit π₯
π DESCRIPTION π
so this creates a new generic drm property, which you can then attach to a drm object with drm_object_attach_property. it's giving "build her, then find her a home" energy π β¨
the returned property object must be freed with drm_property_destroy β and ngl the good news is that's done automatically when you call drm_mode_config_cleanup. so like, cleanup is lowkey handled for you, but you still gotta know it exists, iykyk π§Ήπ
and here's the actual contract, no cap: userspace is allowed to set any unsigned integer value in the (min, max) range, inclusive. inclusive, bestie. both ends. she's generous like that π
β RETURN β
- A pointer to the newly created property on success π
NULLon failure π
that's it. that's the whole return section. short and iconic. periodt π
π§ SEE ALSO π§
- Kernel file
./drivers/gpu/drm/drm_property.coverview(9) β the source material, the lore, the origin story π drm_property_create(9)drm_property_create_enum(9)drm_property_create_bitmask(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)
the whole friend group fr fr π π«Ά
ok but seriously β she only does unsigned values, and bothminandmaxcount. if that's not your problem, check out the signed version up there in SEE ALSO, bestie π
and that's the page!! sourced from ./drivers/gpu/drm, dated October 2026, and titled drm_property_create_range(9) like the absolute queen she is ππ bye bestie, go create some ranged properties, slay 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