drm_property...signed_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 πŸ’–
  • NULL on 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:


side note bestie: if you're skimming and you skipped the description, go back. the drm_property_destroy / drm_mode_config_cleanup thing 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