drm_plane_cr...ion_property(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_plane_cr...ion_property(9) β€” the Kernel API Manual, bestie edition

okay so picture this: you're in the Kernel API Manual, section 9, and the page is literally called drm_plane_cr...ion_property(9) (yes the middle got eaten, it's giving dramatic ellipsis energy, we move). Anyway bestie, let's get into it πŸ’–


✨ NAME ✨

drm_plane_create_rotation_property β€” create a new rotation property. that's it. that's the whole vibe. πŸŽ€


🌸 SYNOPSIS 🌸

int drm_plane_create_rotation_property (struct drm_plane *plane ,
       unsigned int rotation , unsigned int supported_rotations );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • plane β€” a drm plane. the main character, honestly πŸ‘‘
  • rotation β€” the initial value of the rotation property. like, where it starts out before anyone touches it ✨
  • supported_rotations β€” a bitmask of supported rotations and reflections. this is the menu of moves you're allowing 🧚

πŸ’œ DESCRIPTION πŸ’œ

So what this does: it creates a brand-new property with the selected support for transformations. lowkey iconic of it.

now here's the tea πŸ«– β€” a rotation by 180Β° degress is literally the same thing as reflecting both along the x and the y axis, which means the rotation property is somewhat redundant. it's giving "why do I have two of the same shirt". Drivers can use drm_rotation_simplify to normalize values of this property, and honestly slay for that.

The property exposed to userspace is a bitmask property (see drm_property_create_bitmask) called "rotation" and it has the following bitmask enumaration values:

  • DRM_MODE_ROTATE_0: "rotate-0"
  • DRM_MODE_ROTATE_90: "rotate-90"
  • DRM_MODE_ROTATE_180: "rotate-180"
  • DRM_MODE_ROTATE_270: "rotate-270"
  • DRM_MODE_REFLECT_X: "reflect-x"
  • DRM_MODE_REFLECT_Y: "reflect-y"

Now the important part, so listen up 🫢 β€” rotation is the specified amount in degrees in counter clockwise direction, and the X and Y axis are within the source rectangle, i.e. the X/Y axis before rotation. After reflection, the rotation is applied to the image sampled from the source rectangle, before scaling it to fit the destination rectangle. it's a whole pipeline, ok? order matters. periodt. πŸ”₯


🌈 SEE ALSO 🌈


ngl the whole friend group of property-creating functions is in that list β€” go read them, they're all equally slay πŸ’…

kisses bestie, that's the page!! πŸ’–βœ¨ this one lives at ./drivers/gpu/drm, it's from October 2026, and it's officially part of the Kernel API Manual β€” so go forth and rotate responsibly, mwah πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from