drm_property...signed_range(9)
π drm_property...signed_range(9) β the kernel API manual, but make it make sense
okay so bestie, you opened the drm_property...signed_range(9) page and honestly? it's giving "tiny function, big responsibility." let's get into it β¨
πΈ NAME πΈ
drm_property_create_signed_range β creates a brand new signed ranged property type. yes that's the whole vibe. it makes a property. the property holds signed numbers. in a range. iconic behavior honestly π
β¨ SYNOPSIS β¨
struct drm_property * drm_property_create_signed_range (struct
drm_device *dev , u32 flags , const char *name , int64_t min , int64_t
max );
that's the whole call. five args, one pointer back. no cap π«Ά
π ARGUMENTS π
devβ the drm device. the main character of this whole situation fr.flagsβ flags that specify the property type. they tell the property what kind of girl it is πnameβ the name of the property. literally just its name, bestie.minβ the minimum value of the property.maxβ the maximum value of the property.
π¦ DESCRIPTION π¦
okay so what this does: it creates a new generic drm property, and then you can attach it to a drm object using drm_object_attach_property. cute, right? π₯°
now the part you cannot skip: the returned property object must be freed with drm_property_destroy β BUT the good news is that's done automatically when you call drm_mode_config_cleanup. so like, the cleanup is handled for you, you just have to not be weird about it. no double-freeing, we're not doing that today π
and here's the actual meat of it: userspace is allowed to set any signed integer value in the (min, max) range inclusive. inclusive!! both endpoints! the whole sandwich π₯ͺ
β RETURN β
- A pointer to the newly created property on success π
NULLon failure π
so likeβ¦ check for the NULL please. i'm begging. π
π SEE ALSO π
the whole friend group, in order, because we don't leave anyone out:
- Kernel file
./drivers/gpu/drm/drm_property.c overview(9)drm_property_create(9)drm_property_create_enum(9)drm_property_create_bitmask(9)drm_property_create_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)
side note bestie: if you're skimming and you skipped the description, go back. thedrm_property_destroy/drm_mode_config_cleanupthing is not optional and i will not be held responsible for your leaks π
and that's the page!! mwah π this one lives over in ./drivers/gpu/drm, dated October 2026 β go off, kernel docs, 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