drm_plane_cr...ion_property(9)
π 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 π
- Kernel file
./drivers/gpu/drm/drm_blend.c,overview(9) drm_plane_create_alpha_property(9)drm_rotation_simplify(9)drm_plane_create_zpos_property(9)drm_plane_create_zpos_immutable_property(9)drm_atomic_normalize_zpos(9)drm_plane_create_blend_mode_property(9)drm_crtc_attach_background_color_property(9)
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
- 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