drm_property_create_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 πŸŽ‰
  • NULL on failure πŸ’€

that's it. that's the whole return section. short and iconic. periodt πŸŽ€


🧚 SEE ALSO 🧚

the whole friend group fr fr πŸ’…πŸ«Ά


ok but seriously β€” she only does unsigned values, and both min and max count. 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